Method: Concurrent::Promise#fail
- Defined in:
- lib/concurrent/promise.rb
#fail(reason = StandardError.new) ⇒ IVar
Set the IVar to failed due to some error and wake or notify all threads waiting on it.
277 278 279 |
# File 'lib/concurrent/promise.rb', line 277 def fail(reason = StandardError.new) set { raise reason } end |