PyDocs

Nav

Networking and Interprocess Communication

timeout_at

asyncio

function · Added in 3.11 (source) not WASI
  • timeout_at(when)
Schedule the timeout at absolute time.

Like timeout() but argument gives absolute time in the same clock system
as loop.time().

Please note: it is not POSIX time but a time with
undefined starting base, e.g. the time of the system power on.

>>> async with asyncio.timeout_at(loop.time() + 10):
...     await long_running_task()


when - a deadline when timeout occurs or None to disable timeout logic

long_running_task() is interrupted by raising asyncio.CancelledError,
the top-most affected timeout() context manager converts CancelledError
into TimeoutError.
0 Examples
No examples for asyncio/timeout_at.
See Also
No see-alsos for asyncio/timeout_at
0 Notes
No notes for timeout_at