Skip to content

Commit da27542

Browse files
committed
Better docs on Future.
1 parent cfd030f commit da27542

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/concurrent/future.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ def execute
9494
#
9595
# @yield the asynchronous operation to perform
9696
#
97+
# @param [Hash] opts the options controlling how the future will be processed
98+
# @option opts [Boolean] :operation (false) when `true` will execute the future on the global
99+
# operation pool (for long-running operations), when `false` will execute the future on the
100+
# global task pool (for short-running tasks)
101+
# @option opts [object] :executor when provided will run all operations on
102+
# this executor rather than the global thread pool (overrides :operation)
97103
# @option opts [String] :dup_on_deref (false) call `#dup` before returning the data
98104
# @option opts [String] :freeze_on_deref (false) call `#freeze` before returning the data
99105
# @option opts [String] :copy_on_deref (nil) call the given `Proc` passing the internal value and

0 commit comments

Comments
 (0)