Class: Rbgo::IOReceipt
- Inherits:
-
Object
- Object
- Rbgo::IOReceipt
- Defined in:
- lib/rbgo/io_machine.rb
Instance Attribute Summary collapse
-
#done_flag ⇒ Object
readonly
Returns the value of attribute done_flag.
-
#registered_op ⇒ Object
readonly
Returns the value of attribute registered_op.
-
#res ⇒ Object
Returns the value of attribute res.
Instance Method Summary collapse
Instance Attribute Details
#done_flag ⇒ Object
Returns the value of attribute done_flag.
6 7 8 |
# File 'lib/rbgo/io_machine.rb', line 6 def done_flag @done_flag end |
#registered_op ⇒ Object
Returns the value of attribute registered_op.
6 7 8 |
# File 'lib/rbgo/io_machine.rb', line 6 def registered_op @registered_op end |
#res ⇒ Object
Returns the value of attribute res.
7 8 9 |
# File 'lib/rbgo/io_machine.rb', line 7 def res @res end |
Instance Method Details
#notify ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/rbgo/io_machine.rb', line 18 def notify mutex.synchronize do self.done_flag = true cond.signal end nil end |
#wait ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/rbgo/io_machine.rb', line 9 def wait mutex.synchronize do until done_flag cond.wait(mutex) end end nil end |