Skip to content

Commit 1a4b8f8

Browse files
committed
Minor documentation updates to Future.
1 parent 5cf5a60 commit 1a4b8f8

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

lib/concurrent/future.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ class Future < IVar
5151
# @option opts [Boolean] :operation (false) when +true+ will execute the future on the global
5252
# operation pool (for long-running operations), when +false+ will execute the future on the
5353
# global task pool (for short-running tasks)
54+
# @option opts [object] :executor when provided will run all operations on
55+
# this executor rather than the global thread pool (overrides :operation)
5456
# @option opts [String] :dup_on_deref (false) call +#dup+ before returning the data
5557
# @option opts [String] :freeze_on_deref (false) call +#freeze+ before returning the data
5658
# @option opts [String] :copy_on_deref (nil) call the given +Proc+ passing the internal value and

spec/concurrent/future_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module Concurrent
88

99
let!(:value) { 10 }
1010
let(:executor) { PerThreadExecutor.new }
11+
1112
subject do
1213
Future.new(executor: executor){
1314
value

0 commit comments

Comments
 (0)