class TkrzwRPC::Event
Public Class Methods
new()
click to toggle source
# File tkrzw_rpc.rb, line 1160 def initialize @mutex = Mutex.new @cond = ConditionVariable.new @is_set = false end
Public Instance Methods
clear()
click to toggle source
# File tkrzw_rpc.rb, line 1171 def clear @mutex.synchronize { @is_set = false } end
set()
click to toggle source
# File tkrzw_rpc.rb, line 1165 def set @mutex.synchronize { @is_set = true } @cond.signal end
wait()
click to toggle source
# File tkrzw_rpc.rb, line 1176 def wait @mutex.synchronize { while not @is_set do @cond.wait(@mutex) end } end