class Rinda::WaitTemplateEntry
Attributes
finished[RW]
found[R]
place[R]
signaled[RW]
thread[R]
Public Class Methods
new(place, ary, expires=nil)
click to toggle source
@note
removed monitor from original
Calls superclass method
# File lib/pione/patch/rinda-patch.rb, line 52 def initialize(place, ary, expires=nil) super(ary, expires) @place = place @found = nil @signaled = false @finished = false end
Public Instance Methods
==(other)
click to toggle source
# File lib/pione/patch/rinda-patch.rb, line 92 def ==(other) return false unless other.kind_of?(WaitTemplateEntry) return false unless value == other.value return false unless @thread == other.thread return false unless @signaled == other.signaled return false unless @finished == other.finished return true end
inspect()
click to toggle source
# File lib/pione/patch/rinda-patch.rb, line 77 def inspect infos = [ "@cancel=%s" % @cancel, "@expires=%s" % @expires, "@tuple=%s" % @tuple.inspect, "@renewer=%s" % @renewer.inspect, "@found=%s" % @found.inspect, "@thread=%s" % @thread.inspect, "@signaled=%s" % @signaled, "@finished=%s" % @finished ] "#<%s:%s %s>" % ["Rinda::WaitTemplateEntry", __id__, infos.join(", ")] end
Also aliased as: to_s
signal()
click to toggle source
@note
thread version(don't use monitor)
# File lib/pione/patch/rinda-patch.rb, line 70 def signal @signaled = true if @thread && @thread.status == "sleep" @thread.run end end
wait()
click to toggle source
@note
thread version(don't use monitor)
# File lib/pione/patch/rinda-patch.rb, line 62 def wait @thread = Thread.current Thread.stop @thread = nil end