File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,18 @@ class Agent
21
21
#
22
22
# @param [Object] initial the initial value
23
23
#
24
- # @!macro executor_and_deref_options
24
+ # @!macro [attach] executor_and_deref_options
25
+ #
26
+ # @param [Hash] opts the options used to define the behavior at update and deref
27
+ # and to specify the executor on which to perform actions
28
+ # @option opts [Executor] :executor when set use the given `Executor` instance.
29
+ # Three special values are also supported: `:task` returns the global task pool,
30
+ # `:operation` returns the global operation pool, and `:immediate` returns a new
31
+ # `ImmediateExecutor` object.
32
+ # @option opts [Boolean] :dup_on_deref (false) call `#dup` before returning the data
33
+ # @option opts [Boolean] :freeze_on_deref (false) call `#freeze` before returning the data
34
+ # @option opts [Proc] :copy_on_deref (nil) call the given `Proc` passing
35
+ # the internal value and returning the value returned from the proc
25
36
def initialize ( initial , opts = { } )
26
37
@value = initial
27
38
@rescuers = [ ]
Original file line number Diff line number Diff line change @@ -164,9 +164,9 @@ def object
164
164
end
165
165
end
166
166
end
167
- end
168
167
169
- private_constant :WeakReference
168
+ private_constant :WeakReference
169
+ end
170
170
171
171
# The classes behave similar to Hashes, but the keys in the map are not strong references
172
172
# and can be reclaimed by the garbage collector at any time. When a key is reclaimed, the
Original file line number Diff line number Diff line change @@ -51,18 +51,7 @@ class Delay < Synchronization::Object
51
51
52
52
# Create a new `Delay` in the `:pending` state.
53
53
#
54
- # @!macro [attach] executor_and_deref_options
55
- #
56
- # @param [Hash] opts the options used to define the behavior at update and deref
57
- # and to specify the executor on which to perform actions
58
- # @option opts [Executor] :executor when set use the given `Executor` instance.
59
- # Three special values are also supported: `:task` returns the global task pool,
60
- # `:operation` returns the global operation pool, and `:immediate` returns a new
61
- # `ImmediateExecutor` object.
62
- # @option opts [Boolean] :dup_on_deref (false) call `#dup` before returning the data
63
- # @option opts [Boolean] :freeze_on_deref (false) call `#freeze` before returning the data
64
- # @option opts [Proc] :copy_on_deref (nil) call the given `Proc` passing
65
- # the internal value and returning the value returned from the proc
54
+ # @!macro executor_and_deref_options
66
55
#
67
56
# @yield the delayed operation to perform
68
57
#
You can’t perform that action at this time.
0 commit comments