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

Method call_at

Lib/asyncio/base_events.py:804–820  ·  view source on GitHub ↗

Like call_later(), but uses an absolute time. Absolute time corresponds to the event loop's time() method.

(self, when, callback, *args, context=None)

Source from the content-addressed store, hash-verified

802 return timer
803
804 def call_at(self, when, callback, *args, context=None):
805 """Like call_later(), but uses an absolute time.
806
807 Absolute time corresponds to the event loop's time() method.
808 """
809 if when is None:
810 raise TypeError("when cannot be None")
811 self._check_closed()
812 if self._debug:
813 self._check_thread()
814 self._check_callback(callback, 'call_at')
815 timer = events.TimerHandle(when, callback, args, self, context)
816 if timer._source_traceback:
817 del timer._source_traceback[-1]
818 heapq.heappush(self._scheduled, timer)
819 timer._scheduled = True
820 return timer
821
822 def call_soon(self, callback, *args, context=None):
823 """Arrange for a callback to be called as soon as possible.

Callers 1

call_laterMethod · 0.95

Calls 3

_check_closedMethod · 0.95
_check_threadMethod · 0.95
_check_callbackMethod · 0.95

Tested by

no test coverage detected