async-container 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5ddc478ba62bbc6235716fe746950d01dcfe06e
4
- data.tar.gz: f08eef6b4d12281302f763cbf818f4ed99b0c068
3
+ metadata.gz: f054ec2d930dd7d19ce471c573cd610918273b3b
4
+ data.tar.gz: 55a405f680f222f6e5b0d53ba804abd8f1f5db63
5
5
  SHA512:
6
- metadata.gz: 783d568260d28ffa4238ca5dd7866c67c4a334d2c76f708f727403be7d560179173ea030799c34d7641781a43958305c473b2029bddf9bfc267bb4a09c785584
7
- data.tar.gz: 7a744abbe0a3c08575e1a38f6e40f3e4b11a587c72a92b8b031839519ed4244b1fdf4d1f27c7afb0dddb242fa7051a97f5566b65a3ac292186ba03a8bcd51361
6
+ metadata.gz: b3c32c219d9e883625af7adb9a0103327301d71d55b152cbd6bc5f6852fc495d573e6cd3851fd58e4f24612aecb63a9549a51ca83886ac23f6ead023dbf025f2
7
+ data.tar.gz: 5183ffb81192b4115e014c7ee58f64d662d63c014f2e3705233e79a5d4a1993e98750ef7e6d81b791d37359d59981b3ff642a822c19aab39465cee543de582e0
@@ -28,7 +28,11 @@ module Async
28
28
  def initialize(concurrency: 1, &block)
29
29
  @pids = concurrency.times.collect do
30
30
  fork do
31
- Async::Reactor.run(&block)
31
+ begin
32
+ Async::Reactor.run(&block)
33
+ rescue Interrupt
34
+ # Exit cleanly.
35
+ end
32
36
  end
33
37
  end
34
38
  end
@@ -34,7 +34,11 @@ module Async
34
34
  Thread.new do
35
35
  Thread.current.abort_on_exception = true
36
36
 
37
- reactor.run(&block)
37
+ begin
38
+ reactor.run(&block)
39
+ rescue Interrupt
40
+ # Exit cleanly.
41
+ end
38
42
  end
39
43
  end
40
44
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module Container
23
- VERSION = "0.1.0"
23
+ VERSION = "0.2.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-15 00:00:00.000000000 Z
11
+ date: 2017-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async