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

Method call_later

tornado/ioloop.py:604–617  ·  view source on GitHub ↗

Runs the ``callback`` after ``delay`` seconds have passed. Returns an opaque handle that may be passed to `remove_timeout` to cancel. Note that unlike the `asyncio` method of the same name, the returned object does not have a ``cancel()`` method. See `add_timeout`

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

Source from the content-addressed store, hash-verified

602 raise TypeError("Unsupported deadline %r" % deadline)
603
604 def call_later(
605 self, delay: float, callback: Callable, *args: Any, **kwargs: Any
606 ) -> object:
607 """Runs the ``callback`` after ``delay`` seconds have passed.
608
609 Returns an opaque handle that may be passed to `remove_timeout`
610 to cancel. Note that unlike the `asyncio` method of the same
611 name, the returned object does not have a ``cancel()`` method.
612
613 See `add_timeout` for comments on thread-safety and subclassing.
614
615 .. versionadded:: 4.0
616 """
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

Callers 12

sleepFunction · 0.80
test_notifyMethod · 0.80
test_wait_timeoutMethod · 0.80
test_acquire_timeoutMethod · 0.80
call_atMethod · 0.80

Calls 2

call_atMethod · 0.95
timeMethod · 0.95