Skip to content

Commit efb1a4c

Browse files
committed
Renamed Async#defer alias to #delay to better mirror the Future/Delay class semantics.
1 parent 985fb5a commit efb1a4c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/concurrent/async.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,6 @@ def async
271271
def await
272272
@__await_delegator__ ||= AwaitDelegator.new(self, Mutex.new)
273273
end
274-
alias_method :defer, :await
274+
alias_method :delay, :await
275275
end
276276
end

spec/concurrent/async_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ def many(*args, &block) nil; end
239239
val.value.should eq :foo
240240
end
241241

242-
it 'is aliased as #defer' do
243-
val = subject.defer.echo(5)
242+
it 'is aliased as #delay' do
243+
val = subject.delay.echo(5)
244244
val.should be_a Concurrent::IVar
245245
end
246246

0 commit comments

Comments
 (0)