MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / start

Method start

tools/python-3.11.9-amd64/Lib/threading.py:945–969  ·  view source on GitHub ↗

Start the thread's activity. It must be called at most once per thread object. It arranges for the object's run() method to be invoked in a separate thread of control. This method will raise a RuntimeError if called more than once on the same thread object.

(self)

Source from the content-addressed store, hash-verified

943 return "<%s(%s, %s)>" % (self.__class__.__name__, self._name, status)
944
945 def start(self):
946 """Start the thread&#x27;s activity.
947
948 It must be called at most once per thread object. It arranges for the
949 object&#x27;s run() method to be invoked in a separate thread of control.
950
951 This method will raise a RuntimeError if called more than once on the
952 same thread object.
953
954 """
955 if not self._initialized:
956 raise RuntimeError("thread.__init__() not called")
957
958 if self._started.is_set():
959 raise RuntimeError("threads can only be started once")
960
961 with _active_limbo_lock:
962 _limbo[self] = self
963 try:
964 _start_new_thread(self._bootstrap, ())
965 except Exception:
966 with _active_limbo_lock:
967 del _limbo[self]
968 raise
969 self._started.wait()
970
971 def run(self):
972 """Method representing the thread&#x27;s activity.

Callers 15

process_requestMethod · 0.95
add_child_handlerMethod · 0.95
startMethod · 0.95
_adjust_thread_countMethod · 0.95
test_openMethod · 0.95
test_GetLastErrorMethod · 0.95
serve_foreverMethod · 0.95
accepterMethod · 0.95
_startMethod · 0.95
_prepare_threadsMethod · 0.95
run_commandMethod · 0.95

Calls 2

is_setMethod · 0.45
waitMethod · 0.45

Tested by 3

test_openMethod · 0.76
test_GetLastErrorMethod · 0.76
parseMethod · 0.36