instance method
wait_for
Ruby on Rails edge
Since v5.0.7.2 Private — implementation detail, not part of the public APISignature
wait_for(method, &block)
No documentation comment.
Parameters
-
methodreq -
blockblock
Source
# File activesupport/lib/active_support/concurrency/share_lock.rb, line 228
def wait_for(method, &block)
owner = current_owner
@sleeping[owner] = method
@cv.wait_while(&block)
ensure
@sleeping.delete owner
end
Defined in activesupport/lib/active_support/concurrency/share_lock.rb line 228
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Concurrency::ShareLock