MCPcopy Index your code
hub / github.com/python/cpython / timeout_at

Function timeout_at

Lib/asyncio/timeouts.py:163–182  ·  view source on GitHub ↗

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(lo

(when: float | None)

Source from the content-addressed store, hash-verified

161
162
163def timeout_at(when: float | None) -> Timeout:
164 """Schedule the timeout at absolute time.
165
166 Like timeout() but argument gives absolute time in the same clock system
167 as loop.time().
168
169 Please note: it is not POSIX time but a time with
170 undefined starting base, e.g. the time of the system power on.
171
172 >>> async with asyncio.timeout_at(loop.time() + 10):
173 ... await long_running_task()
174
175
176 when - a deadline when timeout occurs or None to disable timeout logic
177
178 long_running_task() is interrupted by raising asyncio.CancelledError,
179 the top-most affected timeout() context manager converts CancelledError
180 into TimeoutError.
181 """
182 return Timeout(when)

Callers

nothing calls this directly

Calls 1

TimeoutClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…