MCPcopy Create free account
hub / github.com/python-websockets/websockets / _reschedule

Method _reschedule

src/websockets/asyncio/async_timeout.py:240–254  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

238 self._reschedule()
239
240 def _reschedule(self) -> None:
241 assert self._state == _State.ENTER
242 deadline = self._deadline
243 if deadline is None:
244 return
245
246 now = self._loop.time()
247 if self._timeout_handler is not None:
248 self._timeout_handler.cancel()
249
250 self._task = asyncio.current_task()
251 if deadline <= now:
252 self._timeout_handler = self._loop.call_soon(self._on_timeout)
253 else:
254 self._timeout_handler = self._loop.call_at(deadline, self._on_timeout)
255
256 def _do_enter(self) -> None:
257 if self._state != _State.INIT:

Callers 2

updateMethod · 0.95
_do_enterMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected