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)
| 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.""" |
no test coverage detected