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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 793ecb127939757bfebe945aaf8d0a04abed1ba6
4
- data.tar.gz: efd7bf4be657e131700a904377e5d7d792c4e1f8
3
+ metadata.gz: 8fd591665c339c3a5a85122cbb56795b5816ec70
4
+ data.tar.gz: b7323cd2ce2d6aad45c45579de0bf0c6d84da351
5
5
  SHA512:
6
- metadata.gz: 01704d17b959dabf4ef3eb38c1d1f83ec5a1008298b344e242d59ae8a9ec64fa0978eabe75e62d4c259f0122a666f3bdf6a6932c31b468571695a02a8bf337f1
7
- data.tar.gz: b3c7a588c628f74126b0cdec12e64ba7cc283bdae8a31f075e81616bf06d18e0668e1a7f578c573d8e6b1f537ccf21a7d387624f53ae2dc7d91ee58c604e7fa3
6
+ metadata.gz: 79c93bf979b7e2ed1351de477cf90dcc500065e3fb5f1ea605b13e48f250b48b85567e35dcdc4220c0a39f4e56f4ce5a556b812f590a657ae0c1edc91b119b41
7
+ data.tar.gz: be1b549c914b1141a3e4a7c96aa52cf38962c355116cb45fce068af5fc21432347d482d9550e1713d44fdb744189f8acf0dbf56aab065c9fff9d3686fb5472e6
@@ -1,4 +1,11 @@
1
- ## Current Release v1.0.1 (27 February 2016)
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`.
@@ -76,10 +76,6 @@ module Concurrent
76
76
  @backend.key?(key)
77
77
  end
78
78
 
79
- def value?(value)
80
- @backend.value?(value)
81
- end
82
-
83
79
  def delete(key)
84
80
  @backend.delete(key)
85
81
  end
@@ -53,10 +53,6 @@ module Concurrent
53
53
  synchronize { super }
54
54
  end
55
55
 
56
- def value?(value)
57
- synchronize { super }
58
- end
59
-
60
56
  def delete(key)
61
57
  synchronize { super }
62
58
  end
@@ -149,7 +149,7 @@ module Concurrent
149
149
  return true if value.equal?(v)
150
150
  end
151
151
  false
152
- end unless method_defined?(:value?)
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'
@@ -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 four possible states: *unscheduled*, *pending*, *rejected*,
32
- # and *fulfilled*. A Promise created using `.new` will be *unscheduled*. It is
33
- # scheduled by calling the `execute` method. Upon execution the Promise and
34
- # all its children will be set to *pending*. When a promise is *pending* it
35
- # will remain in that state until processing is complete. A completed Promise
36
- # is either *rejected*, indicating that an exception was thrown during
37
- # processing, or *fulfilled*, indicating it succeeded. If a Promise is
38
- # *fulfilled* its `value` will be updated to reflect the result of the
39
- # operation. If *rejected* the `reason` will be updated with a reference to
40
- # the thrown exception. The predicate methods `unscheduled?`, `pending?`,
41
- # `rejected?`, and `fulfilled?` can be called at any time to obtain the state
42
- # of the Promise, as can the `state` method, which returns a symbol. A Promise
43
- # created using `.execute` will be *pending*, a Promise created using
44
- # `.fulfill(value)` will be *fulfilled* with the given value and a Promise
45
- # created using `.reject(reason)` will be *rejected* with the given reason.
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
@@ -1,4 +1,4 @@
1
1
  module Concurrent
2
- VERSION = '1.0.1'
3
- EDGE_VERSION = '0.2.1'
2
+ VERSION = '1.0.2'
3
+ EDGE_VERSION = '0.2.2'
4
4
  end
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.1
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-27 00:00:00.000000000 Z
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.