ruby / 2.5.3 / rinda / waittemplateentry.html /

class Rinda::WaitTemplateEntry

Parent:
Rinda::TemplateEntry

Documentation?

Attributes

found [R]

Public Class Methods

new (place, ary, expires=nil) Show source
# File lib/rinda/tuplespace.rb, line 185
def initialize(place, ary, expires=nil)
  super(ary, expires)
  @place = place
  @cond = place.new_cond
  @found = nil
end
Calls superclass method Rinda::TupleEntry.new

Public Instance Methods

cancel () Show source
# File lib/rinda/tuplespace.rb, line 192
def cancel
  super
  signal
end
Calls superclass method Rinda::TupleEntry#cancel
read (tuple) Show source
# File lib/rinda/tuplespace.rb, line 201
def read(tuple)
  @found = tuple
  signal
end
signal () Show source
# File lib/rinda/tuplespace.rb, line 206
def signal
  @place.synchronize do
    @cond.signal
  end
end
wait () Show source
# File lib/rinda/tuplespace.rb, line 197
def wait
  @cond.wait
end

Ruby Core © 1993–2017 Yukihiro Matsumoto
Licensed under the Ruby License.
Ruby Standard Library © contributors
Licensed under their own licenses.