MCPcopy Index your code
hub / github.com/RustPython/RustPython / call_soon_threadsafe

Method call_soon_threadsafe

Lib/asyncio/base_events.py:870–882  ·  view source on GitHub ↗

Like call_soon(), but thread-safe.

(self, callback, *args, context=None)

Source from the content-addressed store, hash-verified

868 "than the current one")
869
870 def call_soon_threadsafe(self, callback, *args, context=None):
871 """Like call_soon(), but thread-safe."""
872 self._check_closed()
873 if self._debug:
874 self._check_callback(callback, 'call_soon_threadsafe')
875 handle = events._ThreadSafeHandle(callback, args, self, context)
876 self._ready.append(handle)
877 if handle._source_traceback:
878 del handle._source_traceback[-1]
879 if handle._source_traceback:
880 del handle._source_traceback[-1]
881 self._write_to_self()
882 return handle
883
884 def run_in_executor(self, executor, func, *args):
885 self._check_closed()

Callers 3

_do_shutdownMethod · 0.95
set_debugMethod · 0.95

Calls 4

_check_closedMethod · 0.95
_check_callbackMethod · 0.95
_write_to_selfMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected