Class: Rbgo::IOReceipt
- Inherits:
-
Object
- Object
- Rbgo::IOReceipt
- Defined in:
- lib/rbgo/io_receipt.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.
3 4 5 |
# File 'lib/rbgo/io_receipt.rb', line 3 def done_flag @done_flag end |
#registered_op ⇒ Object
Returns the value of attribute registered_op.
3 4 5 |
# File 'lib/rbgo/io_receipt.rb', line 3 def registered_op @registered_op end |
#res ⇒ Object
Returns the value of attribute res.
4 5 6 |
# File 'lib/rbgo/io_receipt.rb', line 4 def res @res end |
Instance Method Details
#notify ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/rbgo/io_receipt.rb', line 15 def notify mutex.synchronize do self.done_flag = true cond.signal end nil end |
#wait ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/rbgo/io_receipt.rb', line 6 def wait mutex.synchronize do until done_flag cond.wait(mutex) end end nil end |