AtomicReference
An object reference that may be updated atomically.
Exchanger
A synchronization point at which threads can pair and swap elements within pairs. Based on
@@ -286,7 +286,7 @@ A lock that supports multiple readers but only one writer.
A read/write lock with reentrant and upgrade features.
Semaphore
A counting-based locking mechanism that uses permits.
+
+
\ No newline at end of file
diff --git a/docs/1.1.0/Concurrent/LockFreeStack/Node.html b/docs/1.1.0/Concurrent/LockFreeStack/Node.html
index 19ffe789..6b3fb5df 100644
--- a/docs/1.1.0/Concurrent/LockFreeStack/Node.html
+++ b/docs/1.1.0/Concurrent/LockFreeStack/Node.html
@@ -37,7 +37,7 @@
TODO (pitr-ch 20-Dec-2016): Could be unified with Stack class?
-
+
+
Returns:
+
+
+
+
+
+ (Object)
+
+
+
+
+
+
@@ -324,12 +353,12 @@
-11
-12
-13
+15
+16
+17
-
# File 'lib/concurrent/collection/lock_free_stack.rb', line 11
+
# File 'lib/concurrent/collection/lock_free_stack.rb', line 15defvalue@value
diff --git a/docs/1.1.0/Concurrent/Promises.html b/docs/1.1.0/Concurrent/Promises.html
index 262f6bad..5d194e82 100644
--- a/docs/1.1.0/Concurrent/Promises.html
+++ b/docs/1.1.0/Concurrent/Promises.html
@@ -963,6 +963,62 @@ e.g. when the tasks raises an exception.
Creates new future which is resolved after all futures_and_or_events are resolved.
+
+ .zip_futures_over_on(default_executor, enumerable) {|element| ... } ⇒ Future
+
+
+
+
+
+
+ Originally defined in module
+ FactoryMethods
+
+
+
+
+
+
+ Note:
+
Edge Features are under active development and may change frequently.
+
+
+
Deprecations are not added before incompatible changes.
+
Edge version: major is always 0, minor bump means incompatible change,
+patch bump means compatible change.
+
Edge features may also lack tests and documentation.
+
Features developed in concurrent-ruby-edge are expected to move
+to concurrent-ruby when finalised.
+
+
+
+
+
Creates new future which is resolved after all the futures created by future_factory from
+enumerable elements are resolved. Simplified it does:
+zip(*enumerable.map { |e| future e, &future_factory })
+
+
+
+
+
+
+
+
Examples:
+
+
+
# `#succ` calls are executed in parallel
+zip_futures_over_on(:io,[1,2],&:succ).value!# => [2, 3]
Instance of an executor or a name of the
+global executor. Default executor propagates to chained futures unless overridden with
+executor parameter or changed with AbstractEventFuture#with_default_executor.
# File 'lib/concurrent/promises.rb', line 617defon_resolution(*args,&callback)on_resolution_using@DefaultExecutor,*args,&callback
@@ -1258,12 +1258,12 @@ resolved.
+635
636
-637
-638
+637
-
# File 'lib/concurrent/promises.rb', line 636
+
# File 'lib/concurrent/promises.rb', line 635defon_resolution!(*args,&callback)add_callback:callback_on_resolution,args,callback
@@ -1474,12 +1474,12 @@ global executor. The task is executed on it, default executor remains unchanged.
+653
654
-655
-656
+655
-
# File 'lib/concurrent/promises.rb', line 654
+
# File 'lib/concurrent/promises.rb', line 653defon_resolution_using(executor,*args,&callback)add_callback:async_callback_on_resolution,executor,args,callback
@@ -1527,12 +1527,12 @@ global executor. The task is executed on it, default executor remains unchanged.
+529
530
-531
-532
+531
-
# File 'lib/concurrent/promises.rb', line 530
+
# File 'lib/concurrent/promises.rb', line 529defpending?!internal_state.resolved?
@@ -1580,12 +1580,12 @@ global executor. The task is executed on it, default executor remains unchanged.
+535
536
-537
-538
+537
-
# File 'lib/concurrent/promises.rb', line 536
+
# File 'lib/concurrent/promises.rb', line 535defresolved?internal_state.resolved?
@@ -1699,12 +1699,12 @@ global executor. The task is executed on it, default executor remains unchanged.
+523
524
-525
-526
+525
-
# File 'lib/concurrent/promises.rb', line 524
+
# File 'lib/concurrent/promises.rb', line 523defstateinternal_state.to_sym
@@ -1831,12 +1831,12 @@ global executor. The task is executed on it, default executor remains unchanged.
+599
600
-601
-602
+601
-
# File 'lib/concurrent/promises.rb', line 600
+
# File 'lib/concurrent/promises.rb', line 599defto_sformat'%s %s>',super[0..-2],state
@@ -1885,13 +1885,13 @@ executed. This method is called by any other method requiring resolved state, li
+542
543
544
-545
-546
+545
-
# File 'lib/concurrent/promises.rb', line 543
+
# File 'lib/concurrent/promises.rb', line 542deftouch@Promise.touch
@@ -1975,13 +1975,13 @@ and it was resolved, false implies it was not resolved within timeout.
+558
559
560
-561
-562
+561
-
# File 'lib/concurrent/promises.rb', line 559
+
# File 'lib/concurrent/promises.rb', line 558defwait(timeout=nil)result=wait_until_resolved(timeout)
@@ -2057,12 +2057,12 @@ Any futures depending on it will use the new default executor.
# File 'lib/concurrent/promises.rb', line 818defany(event_or_future)AnyResolvedEventPromise.new_blocked_by2(self,event_or_future,@DefaultExecutor).event
@@ -413,13 +413,13 @@ In other words, it inserts delay into the chain of Futures making rest of it laz
+828
829
830
-831
-832
+831
-
# File 'lib/concurrent/promises.rb', line 829
+
# File 'lib/concurrent/promises.rb', line 828defdelayevent=DelayPromise.new(@DefaultExecutor).event
@@ -490,15 +490,15 @@ delay into the chain.
+840
841
842
843
844
-845
-846
+845
-
# File 'lib/concurrent/promises.rb', line 841
+
# File 'lib/concurrent/promises.rb', line 840defschedule(intended_time)chaindo
@@ -549,12 +549,12 @@ delay into the chain.
+858
859
-860
-861
+860
-
# File 'lib/concurrent/promises.rb', line 859
+
# File 'lib/concurrent/promises.rb', line 858defto_eventself
@@ -602,14 +602,14 @@ delay into the chain.
+850
851
852
853
-854
-855
+854
-
# File 'lib/concurrent/promises.rb', line 851
+
# File 'lib/concurrent/promises.rb', line 850defto_futurefuture=Promises.resolvable_future
@@ -660,12 +660,12 @@ Any futures depending on it will use the new default executor.
+864
865
-866
-867
+866
-
# File 'lib/concurrent/promises.rb', line 865
+
# File 'lib/concurrent/promises.rb', line 864defwith_default_executor(executor)EventWrapperPromise.new_blocked_by1(self,executor).event
@@ -721,16 +721,16 @@ then the result is as described in
+804
805
806
807
808
809
-810
-811
Edge Features are under active development and may change frequently.
+
+
+
Deprecations are not added before incompatible changes.
+
Edge version: major is always 0, minor bump means incompatible change,
+patch bump means compatible change.
+
Edge features may also lack tests and documentation.
+
Features developed in concurrent-ruby-edge are expected to move
+to concurrent-ruby when finalised.
+
+
+
+
+
Creates new future which is resolved after all the futures created by future_factory from
+enumerable elements are resolved. Simplified it does:
+zip(*enumerable.map { |e| future e, &future_factory })
+
+
+
+
+
+
+
+
Examples:
+
+
+
# `#succ` calls are executed in parallel
+zip_futures_over_on(:io,[1,2],&:succ).value!# => [2, 3]
Instance of an executor or a name of the
+global executor. Default executor propagates to chained futures unless overridden with
+executor parameter or changed with AbstractEventFuture#with_default_executor.
# File 'lib/concurrent/promises.rb', line 1023defany(event_or_future)AnyResolvedFuturePromise.new_blocked_by2(self,event_or_future,@DefaultExecutor).future
@@ -1149,13 +1149,13 @@ In other words, it inserts delay into the chain of Futures making rest of it laz
+1033
1034
1035
-1036
-1037
+1036
-
# File 'lib/concurrent/promises.rb', line 1034
+
# File 'lib/concurrent/promises.rb', line 1033defdelayevent=DelayPromise.new(@DefaultExecutor).event
@@ -1229,6 +1229,7 @@ In other words, it inserts delay into the chain of Futures making rest of it laz
+956
957
958
959
@@ -1240,11 +1241,10 @@ In other words, it inserts delay into the chain of Futures making rest of it laz
965
966
967
-968
-969
+968
-
# File 'lib/concurrent/promises.rb', line 957
+
# File 'lib/concurrent/promises.rb', line 956defexception(*args)raiseConcurrent::Error,'it is not rejected'unlessrejected?
@@ -1303,12 +1303,12 @@ Be careful if the receiver rejects it will just resolve since Event does not hol
+1068
1069
-1070
-1071
+1070
-
# File 'lib/concurrent/promises.rb', line 1069
+
# File 'lib/concurrent/promises.rb', line 1068defflat_eventFlatEventPromise.new_blocked_by1(self,@DefaultExecutor).event
@@ -1382,12 +1382,12 @@ rejects it will have its rejection.
+1058
1059
-1060
-1061
+1060
-
# File 'lib/concurrent/promises.rb', line 1059
+
# File 'lib/concurrent/promises.rb', line 1058defflat_future(level=1)FlatFuturePromise.new_blocked_by1(self,level,@DefaultExecutor).future
@@ -1435,13 +1435,13 @@ rejects it will have its rejection.
+886
887
888
-889
-890
+889
-
# File 'lib/concurrent/promises.rb', line 887
+
# File 'lib/concurrent/promises.rb', line 886deffulfilled?state=internal_state
@@ -1497,12 +1497,12 @@ rejects it will have its rejection.
+1074
1075
-1076
-1077
+1076
-
# File 'lib/concurrent/promises.rb', line 1075
+
# File 'lib/concurrent/promises.rb', line 1074defon_fulfillment(*args,&callback)on_fulfillment_using@DefaultExecutor,*args,&callback
@@ -1605,12 +1605,12 @@ fulfilled. Does nothing on rejection.
+1085
1086
-1087
-1088
+1087
-
# File 'lib/concurrent/promises.rb', line 1086
+
# File 'lib/concurrent/promises.rb', line 1085defon_fulfillment!(*args,&callback)add_callback:callback_on_fulfillment,args,callback
@@ -1729,12 +1729,12 @@ global executor. The task is executed on it, default executor remains unchanged.
+1097
1098
-1099
-1100
+1099
-
# File 'lib/concurrent/promises.rb', line 1098
+
# File 'lib/concurrent/promises.rb', line 1097defon_fulfillment_using(executor,*args,&callback)add_callback:async_callback_on_fulfillment,executor,args,callback
@@ -1789,12 +1789,12 @@ global executor. The task is executed on it, default executor remains unchanged.
+1103
1104
-1105
-1106
+1105
-
# File 'lib/concurrent/promises.rb', line 1104
+
# File 'lib/concurrent/promises.rb', line 1103defon_rejection(*args,&callback)on_rejection_using@DefaultExecutor,*args,&callback
@@ -1897,12 +1897,12 @@ rejected. Does nothing on fulfillment.
+1114
1115
-1116
-1117
+1116
-
# File 'lib/concurrent/promises.rb', line 1115
+
# File 'lib/concurrent/promises.rb', line 1114defon_rejection!(*args,&callback)add_callback:callback_on_rejection,args,callback
@@ -2021,12 +2021,12 @@ global executor. The task is executed on it, default executor remains unchanged.
# File 'lib/concurrent/promises.rb', line 1002defrescue_on(executor,*args,&task)RescuePromise.new_blocked_by1(self,@DefaultExecutor,executor,args,&task).future
@@ -2492,12 +2492,12 @@ on timeout.
+933
934
-935
-936
+935
-
# File 'lib/concurrent/promises.rb', line 934
+
# File 'lib/concurrent/promises.rb', line 933defresult(timeout=nil)internal_state.resultifwait_until_resolvedtimeout
@@ -2560,12 +2560,12 @@ will become reason of the returned future.
+1142
1143
-1144
-1145
+1144
-
# File 'lib/concurrent/promises.rb', line 1143
+
# File 'lib/concurrent/promises.rb', line 1142defrunRunFuturePromise.new_blocked_by1(self,@DefaultExecutor).future
@@ -2635,15 +2635,15 @@ delay into the chain.
+1040
1041
1042
1043
1044
-1045
-1046
+1045
-
# File 'lib/concurrent/promises.rb', line 1041
+
# File 'lib/concurrent/promises.rb', line 1040defschedule(intended_time)chaindo
@@ -2701,12 +2701,12 @@ delay into the chain.
# File 'lib/concurrent/promises.rb', line 984defthen_on(executor,*args,&task)ThenPromise.new_blocked_by1(self,@DefaultExecutor,executor,args,&task).future
@@ -3223,14 +3223,14 @@ May take a moment if the channel is full.
+1154
1155
1156
1157
-1158
-1159
+1158
-
# File 'lib/concurrent/promises.rb', line 1155
+
# File 'lib/concurrent/promises.rb', line 1154defto_eventevent=Promises.resolvable_event
@@ -3280,12 +3280,12 @@ May take a moment if the channel is full.
# File 'lib/concurrent/promises.rb', line 947defvalue!(timeout=nil)internal_state.valueifwait_until_resolved!timeout
@@ -3592,13 +3592,13 @@ and it was resolved, false implies it was not resolved within timeout.
+939
940
941
-942
-943
+942
-
# File 'lib/concurrent/promises.rb', line 940
+
# File 'lib/concurrent/promises.rb', line 939defwait!(timeout=nil)result=wait_until_resolved!(timeout)
@@ -3648,12 +3648,12 @@ Any futures depending on it will use the new default executor.
+1049
1050
-1051
-1052
+1051
-
# File 'lib/concurrent/promises.rb', line 1050
+
# File 'lib/concurrent/promises.rb', line 1049defwith_default_executor(executor)FutureWrapperPromise.new_blocked_by1(self,executor).future
@@ -3709,16 +3709,16 @@ then the result is as described in
+1008
1009
1010
1011
1012
1013
-1014
-1015
+1014
-
# File 'lib/concurrent/promises.rb', line 1009
+
# File 'lib/concurrent/promises.rb', line 1008defzip(other)ifother.is_a?(Future)
diff --git a/docs/1.1.0/Concurrent/Promises/Future/ThrottleIntegration.html b/docs/1.1.0/Concurrent/Promises/Future/ThrottleIntegration.html
index 24c6518e..1f64b991 100644
--- a/docs/1.1.0/Concurrent/Promises/Future/ThrottleIntegration.html
+++ b/docs/1.1.0/Concurrent/Promises/Future/ThrottleIntegration.html
@@ -203,12 +203,12 @@
-193
-194
-195
+191
+192
+193
-
# File 'lib-edge/concurrent/edge/throttle.rb', line 193
+
# File 'lib-edge/concurrent/edge/throttle.rb', line 191defrescue_throttled_by(throttle,*args,&block)throttled_by(throttle){|trigger|trigger.rescue(*args,&block)}
@@ -286,12 +286,12 @@
-186
-187
-188
+184
+185
+186
-
# File 'lib-edge/concurrent/edge/throttle.rb', line 186
+
# File 'lib-edge/concurrent/edge/throttle.rb', line 184defthen_throttled_by(throttle,*args,&block)throttled_by(throttle){|trigger|trigger.then(*args,&block)}
diff --git a/docs/1.1.0/Concurrent/Promises/ResolvableEvent.html b/docs/1.1.0/Concurrent/Promises/ResolvableEvent.html
index 7edac314..52d73911 100644
--- a/docs/1.1.0/Concurrent/Promises/ResolvableEvent.html
+++ b/docs/1.1.0/Concurrent/Promises/ResolvableEvent.html
@@ -266,12 +266,12 @@ is already resolved.
+1230
1231
-1232
-1233
+1232
-
# File 'lib/concurrent/promises.rb', line 1231
+
# File 'lib/concurrent/promises.rb', line 1230defresolve(raise_on_reassign=true)resolve_withRESOLVED,raise_on_reassign
@@ -319,12 +319,12 @@ is already resolved.
+1237
1238
-1239
-1240
+1239
-
# File 'lib/concurrent/promises.rb', line 1238
+
# File 'lib/concurrent/promises.rb', line 1237defwith_hidden_resolvable@with_hidden_resolvable||=EventWrapperPromise.new_blocked_by1(self,@DefaultExecutor).event
diff --git a/docs/1.1.0/Concurrent/Promises/ResolvableFuture.html b/docs/1.1.0/Concurrent/Promises/ResolvableFuture.html
index 1ace1fdd..af332b2b 100644
--- a/docs/1.1.0/Concurrent/Promises/ResolvableFuture.html
+++ b/docs/1.1.0/Concurrent/Promises/ResolvableFuture.html
@@ -377,12 +377,12 @@ an exception the future rejects with it.
+1275
1276
-1277
-1278
+1277
-
# File 'lib/concurrent/promises.rb', line 1276
+
# File 'lib/concurrent/promises.rb', line 1275defevaluate_to(*args,&block)promise.evaluate_to(*args,block)
@@ -482,12 +482,12 @@ an exception the future rejects with it.
+1285
1286
-1287
-1288
+1287
-
# File 'lib/concurrent/promises.rb', line 1286
+
# File 'lib/concurrent/promises.rb', line 1285defevaluate_to!(*args,&block)promise.evaluate_to(*args,block).wait!
@@ -562,12 +562,12 @@ is already resolved.
+1258
1259
-1260
-1261
+1260
-
# File 'lib/concurrent/promises.rb', line 1259
+
# File 'lib/concurrent/promises.rb', line 1258deffulfill(value,raise_on_reassign=true)promise.fulfill(value,raise_on_reassign)
@@ -642,12 +642,12 @@ is already resolved.
+1266
1267
-1268
-1269
+1268
-
# File 'lib/concurrent/promises.rb', line 1267
+
# File 'lib/concurrent/promises.rb', line 1266defreject(reason,raise_on_reassign=true)promise.reject(reason,raise_on_reassign)
@@ -722,12 +722,12 @@ is already resolved.
+1250
1251
-1252
-1253
+1252
-
# File 'lib/concurrent/promises.rb', line 1251
+
# File 'lib/concurrent/promises.rb', line 1250defresolve(fulfilled=true,value=nil,reason=nil,raise_on_reassign=true)resolve_with(fulfilled?Fulfilled.new(value):Rejected.new(reason),raise_on_reassign)
@@ -775,12 +775,12 @@ is already resolved.
+1292
1293
-1294
-1295
+1294
-
# File 'lib/concurrent/promises.rb', line 1293
+
# File 'lib/concurrent/promises.rb', line 1292defwith_hidden_resolvable@with_hidden_resolvable||=FutureWrapperPromise.new_blocked_by1(self,@DefaultExecutor).future
diff --git a/docs/1.1.0/Concurrent/Synchronization/Object.html b/docs/1.1.0/Concurrent/Synchronization/Object.html
index 60f4deb6..5ab847c0 100644
--- a/docs/1.1.0/Concurrent/Synchronization/Object.html
+++ b/docs/1.1.0/Concurrent/Synchronization/Object.html
@@ -117,7 +117,7 @@