Class: Rinda::WaitTemplateEntry Private
- Inherits:
-
Object
- Object
- Rinda::WaitTemplateEntry
- Defined in:
- lib/pione/patch/rinda-patch.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #finished ⇒ Object private
- #found ⇒ Object readonly private
- #place ⇒ Object readonly private
- #signaled ⇒ Object private
- #thread ⇒ Object readonly private
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?) private
-
#initialize(place, ary, expires = nil) ⇒ WaitTemplateEntry
constructor
private
A new instance of WaitTemplateEntry.
- #inspect ⇒ Object (also: #to_s) private
- #signal ⇒ Object private
- #wait ⇒ Object private
Constructor Details
#initialize(place, ary, expires = nil) ⇒ WaitTemplateEntry
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
removed monitor from original
Returns a new instance of WaitTemplateEntry.
52 53 54 55 56 57 58 |
# 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 |
Instance Attribute Details
#finished ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
48 49 50 |
# File 'lib/pione/patch/rinda-patch.rb', line 48 def finished @finished end |
#found ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
46 47 48 |
# File 'lib/pione/patch/rinda-patch.rb', line 46 def found @found end |
#place ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'lib/pione/patch/rinda-patch.rb', line 44 def place @place end |
#signaled ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
47 48 49 |
# File 'lib/pione/patch/rinda-patch.rb', line 47 def signaled @signaled end |
#thread ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
45 46 47 |
# File 'lib/pione/patch/rinda-patch.rb', line 45 def thread @thread end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
92 93 94 95 96 97 98 99 |
# 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 ⇒ Object Also known as: to_s
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
77 78 79 80 81 82 83 84 85 86 87 88 89 |
# 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 |
#signal ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
thread version(don't use monitor)
70 71 72 73 74 75 |
# File 'lib/pione/patch/rinda-patch.rb', line 70 def signal @signaled = true if @thread && @thread.status == "sleep" @thread.run end end |
#wait ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
thread version(don't use monitor)
62 63 64 65 66 |
# File 'lib/pione/patch/rinda-patch.rb', line 62 def wait @thread = Thread.current Thread.stop @thread = nil end |