-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
3.0featureA new functionalityA new functionalityreference[location] Tarantool manual, Reference part[location] Tarantool manual, Reference part
Description
Product: Tarantool
Since: 3.0
Root document: https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_events/
SME: @ locker
Details
The function takes a notification key and returns the value currently
associated with it.
tarantool> box.watch_once('foo')
---
...
tarantool> box.broadcast('foo', {a = 1, b = 2})
---
...
tarantool> box.watch_once('foo')
---
- {'a': 1, 'b': 2}
...
The new function can be used instead of box.watch()
in case the caller
only needs to retrieve the current value without subscribing to future
changes.
Requested by @locker in tarantool/tarantool@f899bb6.
Metadata
Metadata
Assignees
Labels
3.0featureA new functionalityA new functionalityreference[location] Tarantool manual, Reference part[location] Tarantool manual, Reference part