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

Method __schedule_callbacks

Lib/asyncio/futures.py:171–183  ·  view source on GitHub ↗

Internal: Ask the event loop to call all callbacks. The callbacks are scheduled to be called as soon as possible. Also clears the callback list.

(self)

Source from the content-addressed store, hash-verified

169 return True
170
171 def __schedule_callbacks(self):
172 """Internal: Ask the event loop to call all callbacks.
173
174 The callbacks are scheduled to be called as soon as possible. Also
175 clears the callback list.
176 """
177 callbacks = self._callbacks[:]
178 if not callbacks:
179 return
180
181 self._callbacks[:] = []
182 for callback, ctx in callbacks:
183 self._loop.call_soon(callback, self, context=ctx)
184
185 def cancelled(self):
186 """Return True if the future was cancelled."""

Callers 3

cancelMethod · 0.95
set_resultMethod · 0.95
set_exceptionMethod · 0.95

Calls 1

call_soonMethod · 0.45

Tested by

no test coverage detected