End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Rinda::TupleSpace#notify
notify(event, tuple, sec=nil)
lib/rinda/tuplespace.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/rinda/tuplespace.rb, line 567
def notify(event, tuple, sec=nil)
template = NotifyTemplateEntry.new(self, event, tuple, sec)
synchronize do
@notify_waiter.push(template)
end
template
end
Registers for notifications of event. Returns a NotifyTemplateEntry. See NotifyTemplateEntry for examples of how to listen for notifications.
event can be:
- ‘write’
-
A tuple was added
- ‘take’
-
A tuple was taken or moved
- ‘delete’
-
A tuple was lost after being overwritten or expiring
The TupleSpace will also notify you of the ‘close’ event when the NotifyTemplateEntry has expired.