Class: Async::Condition::Signal
- Inherits:
-
Struct
- Object
- Struct
- Async::Condition::Signal
- Defined in:
- lib/async/condition.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
Returns the value of attribute value.
-
#waiting ⇒ Object
Returns the value of attribute waiting.
Instance Method Summary collapse
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value
73 74 75 |
# File 'lib/async/condition.rb', line 73 def value @value end |
#waiting ⇒ Object
Returns the value of attribute waiting
73 74 75 |
# File 'lib/async/condition.rb', line 73 def waiting @waiting end |
Instance Method Details
#alive? ⇒ Boolean
74 75 76 |
# File 'lib/async/condition.rb', line 74 def alive? true end |
#resume ⇒ Object
78 79 80 81 82 |
# File 'lib/async/condition.rb', line 78 def resume waiting.each do |fiber| fiber.resume(value) if fiber.alive? end end |