concurrent-ruby 1.0.1-java → 1.0.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/lib/concurrent/collection/map/non_concurrent_map_backend.rb +0 -4
- data/lib/concurrent/collection/map/synchronized_map_backend.rb +0 -4
- data/lib/concurrent/map.rb +10 -1
- data/lib/concurrent/promise.rb +16 -15
- data/lib/concurrent/version.rb +2 -2
- data/lib/concurrent_ruby_ext.jar +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fd591665c339c3a5a85122cbb56795b5816ec70
|
4
|
+
data.tar.gz: b7323cd2ce2d6aad45c45579de0bf0c6d84da351
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79c93bf979b7e2ed1351de477cf90dcc500065e3fb5f1ea605b13e48f250b48b85567e35dcdc4220c0a39f4e56f4ce5a556b812f590a657ae0c1edc91b119b41
|
7
|
+
data.tar.gz: be1b549c914b1141a3e4a7c96aa52cf38962c355116cb45fce068af5fc21432347d482d9550e1713d44fdb744189f8acf0dbf56aab065c9fff9d3686fb5472e6
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
## Current Release v1.0.
|
1
|
+
## Current Release v1.0.2 (2 May 2016)
|
2
|
+
|
3
|
+
* Fix bug with `Concurrent::Map` MRI backend `#inspect` method
|
4
|
+
* Fix bug with `Concurrent::Map` MRI backend using `Hash#value?`
|
5
|
+
* Improved documentation and examples
|
6
|
+
* Minor updates to Edge
|
7
|
+
|
8
|
+
### Release v1.0.1 (27 February 2016)
|
2
9
|
|
3
10
|
* Fix "uninitialized constant Concurrent::ReentrantReadWriteLock" error.
|
4
11
|
* Better handling of `autoload` vs. `require`.
|
data/lib/concurrent/map.rb
CHANGED
@@ -149,7 +149,7 @@ module Concurrent
|
|
149
149
|
return true if value.equal?(v)
|
150
150
|
end
|
151
151
|
false
|
152
|
-
end
|
152
|
+
end
|
153
153
|
|
154
154
|
def keys
|
155
155
|
arr = []
|
@@ -202,6 +202,15 @@ module Concurrent
|
|
202
202
|
|
203
203
|
undef :freeze
|
204
204
|
|
205
|
+
# @!visibility private
|
206
|
+
DEFAULT_OBJ_ID_STR_WIDTH = (2**50).class == Fixnum ? 14 : 7 # we want to look "native", 7 for 32-bit, 14 for 64-bit
|
207
|
+
# override default #inspect() method: firstly, we don't want to be spilling our guts (i-vars), secondly, MRI backend's
|
208
|
+
# #inspect() call on its @backend i-var will bump @backend's iter level while possibly yielding GVL
|
209
|
+
def inspect
|
210
|
+
id_str = (object_id << 1).to_s(16).rjust(DEFAULT_OBJ_ID_STR_WIDTH, '0')
|
211
|
+
"#<#{self.class.name}:0x#{id_str} entries=#{size} default_proc=#{@default_proc.inspect}>"
|
212
|
+
end
|
213
|
+
|
205
214
|
private
|
206
215
|
def raise_fetch_no_key
|
207
216
|
raise KeyError, 'key not found'
|
data/lib/concurrent/promise.rb
CHANGED
@@ -28,21 +28,22 @@ module Concurrent
|
|
28
28
|
# When a promise is rejected all its children will be summarily rejected and
|
29
29
|
# will receive the reason.
|
30
30
|
#
|
31
|
-
# Promises have
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
# processing
|
38
|
-
#
|
39
|
-
#
|
40
|
-
#
|
41
|
-
#
|
42
|
-
#
|
43
|
-
#
|
44
|
-
#
|
45
|
-
#
|
31
|
+
# Promises have several possible states: *:unscheduled*, *:pending*,
|
32
|
+
# *:processing*, *:rejected*, or *:fulfilled*. These are also aggregated as
|
33
|
+
# `#incomplete?` and `#complete?`. When a Promise is created it is set to
|
34
|
+
# *:unscheduled*. Once the `#execute` method is called the state becomes
|
35
|
+
# *:pending*. Once a job is pulled from the thread pool's queue and is given
|
36
|
+
# to a thread for processing (often immediately upon `#post`) the state
|
37
|
+
# becomes *:processing*. The future will remain in this state until processing
|
38
|
+
# is complete. A future that is in the *:unscheduled*, *:pending*, or
|
39
|
+
# *:processing* is considered `#incomplete?`. A `#complete?` Promise is either
|
40
|
+
# *:rejected*, indicating that an exception was thrown during processing, or
|
41
|
+
# *:fulfilled*, indicating success. If a Promise is *:fulfilled* its `#value`
|
42
|
+
# will be updated to reflect the result of the operation. If *:rejected* the
|
43
|
+
# `reason` will be updated with a reference to the thrown exception. The
|
44
|
+
# predicate methods `#unscheduled?`, `#pending?`, `#rejected?`, and
|
45
|
+
# `#fulfilled?` can be called at any time to obtain the state of the Promise,
|
46
|
+
# as can the `#state` method, which returns a symbol.
|
46
47
|
#
|
47
48
|
# Retrieving the value of a promise is done through the `value` (alias:
|
48
49
|
# `deref`) method. Obtaining the value of a promise is a potentially blocking
|
data/lib/concurrent/version.rb
CHANGED
data/lib/concurrent_ruby_ext.jar
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concurrent-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Jerry D'Antonio
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-02
|
12
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: |
|
15
15
|
Modern concurrency tools including agents, futures, promises, thread pools, actors, supervisors, and more.
|