MCPcopy
hub / github.com/tornadoweb/tornado / call_at

Method call_at

tornado/ioloop.py:619–635  ·  view source on GitHub ↗

Runs the ``callback`` at the absolute time designated by ``when``. ``when`` must be a number using the same reference point as `IOLoop.time`. Returns an opaque handle that may be passed to `remove_timeout` to cancel. Note that unlike the `asyncio` method of the sam

(
        self, when: float, callback: Callable, *args: Any, **kwargs: Any
    )

Source from the content-addressed store, hash-verified

617 return self.call_at(self.time() + delay, callback, *args, **kwargs)
618
619 def call_at(
620 self, when: float, callback: Callable, *args: Any, **kwargs: Any
621 ) -> object:
622 """Runs the ``callback`` at the absolute time designated by ``when``.
623
624 ``when`` must be a number using the same reference point as
625 `IOLoop.time`.
626
627 Returns an opaque handle that may be passed to `remove_timeout`
628 to cancel. Note that unlike the `asyncio` method of the same
629 name, the returned object does not have a ``cancel()`` method.
630
631 See `add_timeout` for comments on thread-safety and subclassing.
632
633 .. versionadded:: 4.0
634 """
635 return self.add_timeout(when, callback, *args, **kwargs)
636
637 def remove_timeout(self, timeout: object) -> None:
638 """Cancels a pending timeout.

Callers 2

add_timeoutMethod · 0.95
call_laterMethod · 0.95

Calls 1

add_timeoutMethod · 0.95

Tested by

no test coverage detected