Skip to content

Commit 0cfc01c

Browse files
committed
Merge branch 'master' into synchronization
* upstream/master: (22 commits) Async now hides :new and provides safe :create factory. ...
2 parents 7921b49 + ff3b8cf commit 0cfc01c

32 files changed

+1774
-1122
lines changed

.rspec

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
--require spec_helper
22
--color
3-
--backtrace
43
--format documentation

.yardopts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
--protected
21
--no-private
32
--embed-mixins
43
--output-dir ./yardoc

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ end
1818

1919
group :testing do
2020
gem 'rspec', '~> 3.2.0'
21+
gem 'timecop', '~> 0.7.3'
22+
23+
# Coverage
2124
gem 'simplecov', '~> 0.10.0', :require => false
2225
gem 'coveralls', '~> 0.8.1', :require => false
23-
gem 'timecop', '~> 0.7.3'
2426
end

doc/async.md

Lines changed: 0 additions & 134 deletions
This file was deleted.

lib/concurrent/agent.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,18 @@ class Agent
2121
#
2222
# @param [Object] initial the initial value
2323
#
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
2536
def initialize(initial, opts = {})
2637
@value = initial
2738
@rescuers = []

0 commit comments

Comments
 (0)