Method: Concurrent::CyclicBarrier#broken?
- Defined in:
- lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb
#broken? ⇒ Boolean
A barrier can be broken when:
-
a thread called the
resetmethod while at least one other thread was waiting -
at least one thread timed out on
waitmethod
A broken barrier can be restored using reset it’s safer to create a new one
105 106 107 |
# File 'lib/concurrent-ruby/concurrent/atomic/cyclic_barrier.rb', line 105 def broken? synchronize { @generation.status != :waiting } end |