run_iocsh.utils¶
Standalone utilities for run-iocsh.
Attributes¶
Functions¶
|
Poll |
Module Contents¶
- run_iocsh.utils.wait_for(predicate: collections.abc.Callable[[], bool], timeout: float | None = DEFAULT_POLL_TIMEOUT, poll_interval: float = DEFAULT_POLL_INTERVAL) None[source]¶
Poll
predicateuntil it returns True ortimeoutelapses.Exceptions from
predicateare caught and treated as a false result (polling continues until timeout).- Args:
predicate: Callable invoked repeatedly; success when it returns True. timeout: Maximum seconds to wait.
Nonewaits forever, as it doesthroughout the standard library.
0evaluatespredicateonce and never blocks.poll_interval: Seconds to sleep between polls.
- Raises:
- IocshTimeoutError: If the predicate never returns True within
timeout. Also catchable as the builtinTimeoutError.