Class | Rinda::NotifyTemplateEntry |
In: |
lib/rinda/tuplespace.rb
|
Parent: | TemplateEntry |
A NotifyTemplateEntry is returned by TupleSpace#notify and is notified of TupleSpace changes. You may receive either your subscribed event or the ‘close’ event when iterating over notifications.
See TupleSpace#notify_event for valid notification types.
ts = Rinda::TupleSpace.new observer = ts.notify 'write', [nil] Thread.start do observer.each { |t| p t } end 3.times { |i| ts.write [i] }
Outputs:
['write', [0]] ['write', [1]] ['write', [2]]
Creates a new NotifyTemplateEntry that watches place for +event+s that match tuple.
ruby-doc.org is a service of James Britt and Neurogami, a Ruby application development company in Phoenix, AZ.
Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.
For more information on the Ruby programming language, visit ruby-lang.org.
Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.