concurrent-ruby-edge 0.4.0.pre1 → 0.4.0.pre2
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 +4 -4
- data/CHANGELOG.md +2 -0
- data/README.md +2 -2
- data/lib-edge/concurrent/edge/promises.rb +26 -0
- data/lib-edge/concurrent/edge/throttle.rb +0 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e482068cf55c4c1fc70e75e13365b5e6b28e233904889d008258489ac3273685
|
4
|
+
data.tar.gz: 6bbc06bed3afeedb9b1267166f409703d95e42f31d688fbdfd17e440d0c459fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ed7276a40039da9213a6a348d3c74cd4143567f7541623af0342d78be0bbe56dec57d18d066255b1afa8159e09055beace88a7b0af1eef2bfebc3d3e907321f
|
7
|
+
data.tar.gz: bf3d850afcde0f092b666d9638d2f36822c0a1a6dce8f59b4af8903f690c89f0bebbd5ed920a870526c34bed12b4911c2cd24920d84ea98649a43c5794d4be41
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -144,7 +144,7 @@ Thread-safe variables:
|
|
144
144
|
A boolean value that can be updated atomically.
|
145
145
|
* [AtomicFixnum](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/AtomicFixnum.html)
|
146
146
|
A numeric value that can be updated atomically.
|
147
|
-
* [AtomicReference](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/
|
147
|
+
* [AtomicReference](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/AtomicReference.html)
|
148
148
|
An object reference that may be updated atomically.
|
149
149
|
* [Exchanger](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Exchanger.html)
|
150
150
|
A synchronization point at which threads can pair and swap elements within pairs. Based on
|
@@ -178,7 +178,7 @@ Thread-safe variables:
|
|
178
178
|
A read/write lock with reentrant and upgrade features.
|
179
179
|
* [Semaphore](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Semaphore.html)
|
180
180
|
A counting-based locking mechanism that uses permits.
|
181
|
-
* [AtomicMarkableReference](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/
|
181
|
+
* [AtomicMarkableReference](http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/AtomicMarkableReference.html)
|
182
182
|
|
183
183
|
#### Deprecated
|
184
184
|
|
@@ -172,6 +172,32 @@ module Concurrent
|
|
172
172
|
end
|
173
173
|
|
174
174
|
include NewChannelIntegration
|
175
|
+
|
176
|
+
# @!macro promises.shortcut.on
|
177
|
+
# @return [Future]
|
178
|
+
# @!macro warn.edge
|
179
|
+
def zip_futures_over(enumerable, &future_factory)
|
180
|
+
zip_futures_over_on default_executor, enumerable, &future_factory
|
181
|
+
end
|
182
|
+
|
183
|
+
# Creates new future which is resolved after all the futures created by future_factory from
|
184
|
+
# enumerable elements are resolved. Simplified it does:
|
185
|
+
# `zip(*enumerable.map { |e| future e, &future_factory })`
|
186
|
+
# @example
|
187
|
+
# # `#succ` calls are executed in parallel
|
188
|
+
# zip_futures_over_on(:io, [1, 2], &:succ).value! # => [2, 3]
|
189
|
+
#
|
190
|
+
# @!macro promises.param.default_executor
|
191
|
+
# @param [Enumerable] enumerable
|
192
|
+
# @yield a task to be executed in future
|
193
|
+
# @yieldparam [Object] element from enumerable
|
194
|
+
# @yieldreturn [Object] a value of the future
|
195
|
+
# @return [Future]
|
196
|
+
# @!macro warn.edge
|
197
|
+
def zip_futures_over_on(default_executor, enumerable, &future_factory)
|
198
|
+
# ZipFuturesPromise.new_blocked_by(futures_and_or_events, default_executor).future
|
199
|
+
zip_futures_on(default_executor, *enumerable.map { |e| future e, &future_factory })
|
200
|
+
end
|
175
201
|
end
|
176
202
|
|
177
203
|
end
|
@@ -169,8 +169,6 @@ module Concurrent
|
|
169
169
|
def chain_throttled_by(throttle, *args, &block)
|
170
170
|
throttled_by(throttle) { |trigger| trigger.chain(*args, &block) }
|
171
171
|
end
|
172
|
-
|
173
|
-
# TODO (pitr-ch 11-Jul-2018): add other then/rescue methods
|
174
172
|
end
|
175
173
|
|
176
174
|
include ThrottleIntegration
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concurrent-ruby-edge
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.0.
|
4
|
+
version: 0.4.0.pre2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jerry D'Antonio
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-09-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: concurrent-ruby
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - "~>"
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.1.0.
|
21
|
+
version: 1.1.0.pre2
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - "~>"
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.1.0.
|
28
|
+
version: 1.1.0.pre2
|
29
29
|
description: |
|
30
30
|
These features are under active development and may change frequently. They are expected not to
|
31
31
|
keep backward compatibility (there may also lack tests and documentation). Semantic versions will
|