core-async 0.9.0 → 0.10.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
  SHA256:
3
- metadata.gz: ad38e4e865f4be308699dde8ff3bfe22cf4873a7de3b2841d235d8a02c6a33f7
4
- data.tar.gz: 04b405d8f2dbc07fcba33cb76871748165ac1b01c1337e21ea19e2dc225170af
3
+ metadata.gz: 84f855320eba3545932e5019d840f3e7fbcc6c45bba6de79a60dd3101f9ef5e7
4
+ data.tar.gz: 27a66e580273043a1a3377be330f0365cf27f749320dd1d9108ec72ff01f40e3
5
5
  SHA512:
6
- metadata.gz: e97c567a1f930b83302321229038a8cddb4c1be04dacc7986c78f8def3792adfc4e9b65e398dfc48ca482e4fb710de2189f9a09aec7e433495c5f8089ae9ecd5
7
- data.tar.gz: 6fa8167bf7345e5b3d61f55a47938bc81cd84fa5c59156c0bd4c99456b632942c7b95f549add6ae9905da155479fb6950841f2a53170ce688b6b10fa69f3f9ed
6
+ metadata.gz: da5c9211dbd194e0ad48b443635e10b93ef4937f1a677f4de441274b98b3b2509f9800aeb9305fa64ac769487a5085d95dff79cc9d58ff9ee15ea58cc970e05c
7
+ data.tar.gz: 90be0a94b5ec20888d9c2b6eb2c15e7bb1ea8a8745e28575ff5eaf17ca3ff97377fd4ce2a16e0def9c74830d3ca02ad6b277f227d938a19c401f72327dfde658
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [v0.10.0](https://github.com/metabahn/corerb/releases/tag/2021-11-02)
2
+
3
+ *released on 2021-11-02*
4
+
5
+ * `chg` [#97](https://github.com/metabahn/corerb/pull/97) Designate internal state with leading and trailing double underscores ([bryanp](https://github.com/bryanp))
6
+ * `chg` [#95](https://github.com/metabahn/corerb/pull/95) Change the approach to shutting down the scheduler on interrupt ([bryanp](https://github.com/bryanp))
7
+
1
8
  ## [v0.9.0](https://github.com/metabahn/corerb/releases/tag/2021-10-24)
2
9
 
3
10
  *released on 2021-10-24*
@@ -70,7 +70,7 @@ module Core
70
70
  when :pending
71
71
  scheduler = Fiber.scheduler
72
72
 
73
- result = catch :__corerb_async_future_failed do
73
+ result = catch :__corerb_async_future_failed__ do
74
74
  if scheduler.running?
75
75
  if children
76
76
  resolve_all(@filament)
@@ -82,7 +82,7 @@ module Core
82
82
  finished = false
83
83
 
84
84
  scheduler.fiber do
85
- result = catch :__corerb_async_future_failed do
85
+ result = catch :__corerb_async_future_failed__ do
86
86
  if children
87
87
  resolve_all(@filament)
88
88
  else
@@ -178,7 +178,7 @@ module Core
178
178
  when self.class
179
179
  resolve_value(value.result)
180
180
  when Failure
181
- throw :__corerb_async_future_failed, value
181
+ throw :__corerb_async_future_failed__, value
182
182
  else
183
183
  value
184
184
  end
@@ -51,9 +51,12 @@ module Core
51
51
 
52
52
  yield self if block_given?
53
53
 
54
- result = nil
55
- until result == :finished
56
- result = tick
54
+ Thread.handle_interrupt(Interrupt => :never) do
55
+ result = nil
56
+
57
+ until Thread.pending_interrupt? || result == :finished
58
+ result = tick
59
+ end
57
60
  end
58
61
  ensure
59
62
  @running = false
@@ -96,7 +99,7 @@ module Core
96
99
 
97
100
  @timers.fire
98
101
  rescue Errno::EINTR
99
- stop
102
+ # noop
100
103
  end
101
104
 
102
105
  # [public] Stop the scheduler, canceling each scheduled fiber.
@@ -111,7 +114,7 @@ module Core
111
114
 
112
115
  # [public] Cancel the given fiber.
113
116
  #
114
- def cancel(fiber = Thread.current[:__corerb_async_current_fiber])
117
+ def cancel(fiber = Thread.current[:__corerb_async_current_fiber__])
115
118
  self.raise(fiber, Cancel) if fiber
116
119
  end
117
120
 
@@ -162,7 +165,7 @@ module Core
162
165
 
163
166
  fiber = Fiber.new(blocking: false) {
164
167
  begin
165
- Thread.current[:__corerb_async_current_fiber] = filament
168
+ Thread.current[:__corerb_async_current_fiber__] = filament
166
169
  filament.object = fiber
167
170
  result = block.call(filament)
168
171
  rescue Cancel
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Core
4
4
  module Async
5
- VERSION = "0.9.0"
5
+ VERSION = "0.10.0"
6
6
 
7
7
  # [public]
8
8
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: core-async
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Powell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-24 00:00:00.000000000 Z
11
+ date: 2021-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: event