async-container 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e12746b238bcba194703fa7f7506771fd52a9d6cb760a55304037581562c51c
4
- data.tar.gz: 12b70988e2901e107c93c8ca3bd3be1580466872bd4ea3d00f9dc6b3e9bcd58b
3
+ metadata.gz: 1f4a826134a9cc5edf2efbf407a51cac5666ac8f9f1b1102f3ca20b06b512c31
4
+ data.tar.gz: e85ed96741f3998672148983ded42741ad9d0da62855d0f2a1193a5466ee2f9c
5
5
  SHA512:
6
- metadata.gz: 4be0b0dbe5043faa82ee40e2cb32e2651933fe8acb5c869b68e32161d4b50115d00c6a77df53d941b0fce05eb7eab386fb1ba6b69fe13ce9604d477d3eba2ca7
7
- data.tar.gz: 48999559392d5e3ce0565515453866d3eeb12cc283eba0e0fbb6e6dc8f2d63b9bb9eb202559df357ac4f19ca98a29e050ec102a561af9275b2d57cc358312cd3
6
+ metadata.gz: d6d866442204b871f06aca9cb8311d7e0faa12175edfa23c95ea1cd48174ebe185417aa7429c1b6e003022c58a4a7498097ab951dfaf8f02dbf391255032257c
7
+ data.tar.gz: ebeeeb552e814edd808e760ef40299e8702821999f6bf713a1ddac3bc5247b009965a7facc16d340ebf64aee0a6cda4c29c3f84a3efae8fde66c99024cc6d537
@@ -62,7 +62,6 @@ module Async
62
62
  thread = ::Thread.new do
63
63
  thread = ::Thread.current
64
64
 
65
- thread.report_on_exception = false
66
65
  thread.name = name if name
67
66
 
68
67
  instance = Instance.new(thread)
@@ -82,6 +81,8 @@ module Async
82
81
  break
83
82
  end
84
83
  end
84
+ # rescue Interrupt
85
+ # # Graceful exit.
85
86
  end
86
87
 
87
88
  @threads << thread
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module Container
23
- VERSION = "0.10.0"
23
+ VERSION = "0.10.1"
24
24
  end
25
25
  end
@@ -25,19 +25,6 @@ require_relative 'shared_examples'
25
25
  RSpec.describe Async::Container::Forked do
26
26
  it_behaves_like Async::Container
27
27
 
28
- it "can run concurrently" do
29
- subject.async(name: "Sleepy Jerry") do |task, instance|
30
- 3.times do |i|
31
- puts "Counting Sheep #{i}"
32
- instance.name = "Counting Sheep #{i}"
33
-
34
- # sleep 2
35
- end
36
- end
37
-
38
- subject.wait
39
- end
40
-
41
28
  it "can restart child" do
42
29
  trigger = IO.pipe
43
30
  pids = IO.pipe
@@ -25,19 +25,6 @@ require_relative 'shared_examples'
25
25
  RSpec.describe Async::Container::Hybrid do
26
26
  it_behaves_like Async::Container
27
27
 
28
- it "can run concurrently" do
29
- subject.run(count: 1, name: "Sleepy Jerry") do |task, instance|
30
- 3.times do |i|
31
- puts "Counting Sheep #{i}"
32
- instance.name = "Counting Sheep #{i}"
33
-
34
- # sleep 2
35
- end
36
- end
37
-
38
- subject.wait
39
- end
40
-
41
28
  it "should be multiprocess" do
42
29
  expect(described_class).to be_multiprocess
43
30
  end
@@ -33,4 +33,17 @@ RSpec.shared_examples_for Async::Container do
33
33
  output.close
34
34
  expect(input.read).to be == "Hello World"
35
35
  end
36
+
37
+ it "can run concurrently" do
38
+ subject.async(name: "Sleepy Jerry") do |task, instance|
39
+ 3.times do |i|
40
+ puts "Counting Sheep #{i}"
41
+ instance.name = "Counting Sheep #{i}"
42
+
43
+ sleep 0.01
44
+ end
45
+ end
46
+
47
+ subject.wait
48
+ end
36
49
  end
@@ -25,14 +25,6 @@ require_relative 'shared_examples'
25
25
  RSpec.describe Async::Container::Threaded do
26
26
  it_behaves_like Async::Container
27
27
 
28
- it "can run concurrently" do
29
- subject.async(name: "Sleepy Jerry") do
30
- sleep 1
31
- end
32
-
33
- subject.stop
34
- end
35
-
36
28
  it "should not be multiprocess" do
37
29
  expect(described_class).to_not be_multiprocess
38
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams