Arrange for a callback to be called as soon as possible. This operates as a FIFO queue: callbacks are called in the order in which they are registered. Each callback will be called exactly once. Any positional arguments after the callback will be passed to
(self, callback, *args, context=None)
| 815 | return timer |
| 816 | |
| 817 | def call_soon(self, callback, *args, context=None): |
| 818 | """Arrange for a callback to be called as soon as possible. |
| 819 | |
| 820 | This operates as a FIFO queue: callbacks are called in the |
| 821 | order in which they are registered. Each callback will be |
| 822 | called exactly once. |
| 823 | |
| 824 | Any positional arguments after the callback will be passed to |
| 825 | the callback when it is called. |
| 826 | """ |
| 827 | self._check_closed() |
| 828 | if self._debug: |
| 829 | self._check_thread() |
| 830 | self._check_callback(callback, 'call_soon') |
| 831 | handle = self._call_soon(callback, args, context) |
| 832 | if handle._source_traceback: |
| 833 | del handle._source_traceback[-1] |
| 834 | return handle |
| 835 | |
| 836 | def _check_callback(self, callback, method): |
| 837 | if (coroutines.iscoroutine(callback) or |
no test coverage detected