Top.Mail.Ru
box.ctl.wait_ro() | Tarantool
Tarantool
Check out the new release 2.8

box.ctl.wait_ro()

box.ctl.wait_ro([timeout])

Wait until box.info.ro is true.

Parameters:
  • timeout (number) – maximum number of seconds to wait
Return:

nil, or error may be thrown due to timeout or fiber cancellation

Example:

tarantool> box.info().ro
---
- false
...

tarantool> n = box.ctl.wait_ro(0.1)
---
- error: timed out
...