Skip to content

Document box.watch_once() #3510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tracked by #4505
TarantoolBot opened this issue Jun 13, 2023 · 1 comment · Fixed by #4692
Closed
Tracked by #4505

Document box.watch_once() #3510

TarantoolBot opened this issue Jun 13, 2023 · 1 comment · Fixed by #4692
Assignees
Labels
3.0 feature A new functionality reference [location] Tarantool manual, Reference part

Comments

@TarantoolBot
Copy link
Collaborator

TarantoolBot commented Jun 13, 2023

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.

@locker
Copy link
Member

locker commented Jun 13, 2023

Related issues: #3511 #3512

@xuniq xuniq self-assigned this Sep 21, 2023
@xuniq xuniq added feature A new functionality 3.0 reference [location] Tarantool manual, Reference part labels Sep 28, 2023
@xuniq xuniq removed their assignment Nov 30, 2023
@p7nov p7nov self-assigned this Dec 6, 2024
@p7nov p7nov closed this as completed in f396382 Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 feature A new functionality reference [location] Tarantool manual, Reference part
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants