Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../usr/lib64/python3....
File: threading.py
[1000] Fix | Delete
"""
[1001] Fix | Delete
if not self._initialized:
[1002] Fix | Delete
raise RuntimeError("Thread.__init__() not called")
[1003] Fix | Delete
if not self._started.is_set():
[1004] Fix | Delete
raise RuntimeError("cannot join thread before it is started")
[1005] Fix | Delete
if self is current_thread():
[1006] Fix | Delete
raise RuntimeError("cannot join current thread")
[1007] Fix | Delete
[1008] Fix | Delete
if timeout is None:
[1009] Fix | Delete
self._wait_for_tstate_lock()
[1010] Fix | Delete
else:
[1011] Fix | Delete
# the behavior of a negative timeout isn't documented, but
[1012] Fix | Delete
# historically .join(timeout=x) for x<0 has acted as if timeout=0
[1013] Fix | Delete
self._wait_for_tstate_lock(timeout=max(timeout, 0))
[1014] Fix | Delete
[1015] Fix | Delete
def _wait_for_tstate_lock(self, block=True, timeout=-1):
[1016] Fix | Delete
# Issue #18808: wait for the thread state to be gone.
[1017] Fix | Delete
# At the end of the thread's life, after all knowledge of the thread
[1018] Fix | Delete
# is removed from C data structures, C code releases our _tstate_lock.
[1019] Fix | Delete
# This method passes its arguments to _tstate_lock.acquire().
[1020] Fix | Delete
# If the lock is acquired, the C code is done, and self._stop() is
[1021] Fix | Delete
# called. That sets ._is_stopped to True, and ._tstate_lock to None.
[1022] Fix | Delete
lock = self._tstate_lock
[1023] Fix | Delete
if lock is None: # already determined that the C code is done
[1024] Fix | Delete
assert self._is_stopped
[1025] Fix | Delete
elif lock.acquire(block, timeout):
[1026] Fix | Delete
lock.release()
[1027] Fix | Delete
self._stop()
[1028] Fix | Delete
[1029] Fix | Delete
@property
[1030] Fix | Delete
def name(self):
[1031] Fix | Delete
"""A string used for identification purposes only.
[1032] Fix | Delete
[1033] Fix | Delete
It has no semantics. Multiple threads may be given the same name. The
[1034] Fix | Delete
initial name is set by the constructor.
[1035] Fix | Delete
[1036] Fix | Delete
"""
[1037] Fix | Delete
assert self._initialized, "Thread.__init__() not called"
[1038] Fix | Delete
return self._name
[1039] Fix | Delete
[1040] Fix | Delete
@name.setter
[1041] Fix | Delete
def name(self, name):
[1042] Fix | Delete
assert self._initialized, "Thread.__init__() not called"
[1043] Fix | Delete
self._name = str(name)
[1044] Fix | Delete
[1045] Fix | Delete
@property
[1046] Fix | Delete
def ident(self):
[1047] Fix | Delete
"""Thread identifier of this thread or None if it has not been started.
[1048] Fix | Delete
[1049] Fix | Delete
This is a nonzero integer. See the get_ident() function. Thread
[1050] Fix | Delete
identifiers may be recycled when a thread exits and another thread is
[1051] Fix | Delete
created. The identifier is available even after the thread has exited.
[1052] Fix | Delete
[1053] Fix | Delete
"""
[1054] Fix | Delete
assert self._initialized, "Thread.__init__() not called"
[1055] Fix | Delete
return self._ident
[1056] Fix | Delete
[1057] Fix | Delete
if _HAVE_THREAD_NATIVE_ID:
[1058] Fix | Delete
@property
[1059] Fix | Delete
def native_id(self):
[1060] Fix | Delete
"""Native integral thread ID of this thread, or None if it has not been started.
[1061] Fix | Delete
[1062] Fix | Delete
This is a non-negative integer. See the get_native_id() function.
[1063] Fix | Delete
This represents the Thread ID as reported by the kernel.
[1064] Fix | Delete
[1065] Fix | Delete
"""
[1066] Fix | Delete
assert self._initialized, "Thread.__init__() not called"
[1067] Fix | Delete
return self._native_id
[1068] Fix | Delete
[1069] Fix | Delete
def is_alive(self):
[1070] Fix | Delete
"""Return whether the thread is alive.
[1071] Fix | Delete
[1072] Fix | Delete
This method returns True just before the run() method starts until just
[1073] Fix | Delete
after the run() method terminates. The module function enumerate()
[1074] Fix | Delete
returns a list of all alive threads.
[1075] Fix | Delete
[1076] Fix | Delete
"""
[1077] Fix | Delete
assert self._initialized, "Thread.__init__() not called"
[1078] Fix | Delete
if self._is_stopped or not self._started.is_set():
[1079] Fix | Delete
return False
[1080] Fix | Delete
self._wait_for_tstate_lock(False)
[1081] Fix | Delete
return not self._is_stopped
[1082] Fix | Delete
[1083] Fix | Delete
def isAlive(self):
[1084] Fix | Delete
"""Return whether the thread is alive.
[1085] Fix | Delete
[1086] Fix | Delete
This method is deprecated, use is_alive() instead.
[1087] Fix | Delete
"""
[1088] Fix | Delete
import warnings
[1089] Fix | Delete
warnings.warn('isAlive() is deprecated, use is_alive() instead',
[1090] Fix | Delete
DeprecationWarning, stacklevel=2)
[1091] Fix | Delete
return self.is_alive()
[1092] Fix | Delete
[1093] Fix | Delete
@property
[1094] Fix | Delete
def daemon(self):
[1095] Fix | Delete
"""A boolean value indicating whether this thread is a daemon thread.
[1096] Fix | Delete
[1097] Fix | Delete
This must be set before start() is called, otherwise RuntimeError is
[1098] Fix | Delete
raised. Its initial value is inherited from the creating thread; the
[1099] Fix | Delete
main thread is not a daemon thread and therefore all threads created in
[1100] Fix | Delete
the main thread default to daemon = False.
[1101] Fix | Delete
[1102] Fix | Delete
The entire Python program exits when only daemon threads are left.
[1103] Fix | Delete
[1104] Fix | Delete
"""
[1105] Fix | Delete
assert self._initialized, "Thread.__init__() not called"
[1106] Fix | Delete
return self._daemonic
[1107] Fix | Delete
[1108] Fix | Delete
@daemon.setter
[1109] Fix | Delete
def daemon(self, daemonic):
[1110] Fix | Delete
if not self._initialized:
[1111] Fix | Delete
raise RuntimeError("Thread.__init__() not called")
[1112] Fix | Delete
if self._started.is_set():
[1113] Fix | Delete
raise RuntimeError("cannot set daemon status of active thread")
[1114] Fix | Delete
self._daemonic = daemonic
[1115] Fix | Delete
[1116] Fix | Delete
def isDaemon(self):
[1117] Fix | Delete
return self.daemon
[1118] Fix | Delete
[1119] Fix | Delete
def setDaemon(self, daemonic):
[1120] Fix | Delete
self.daemon = daemonic
[1121] Fix | Delete
[1122] Fix | Delete
def getName(self):
[1123] Fix | Delete
return self.name
[1124] Fix | Delete
[1125] Fix | Delete
def setName(self, name):
[1126] Fix | Delete
self.name = name
[1127] Fix | Delete
[1128] Fix | Delete
[1129] Fix | Delete
try:
[1130] Fix | Delete
from _thread import (_excepthook as excepthook,
[1131] Fix | Delete
_ExceptHookArgs as ExceptHookArgs)
[1132] Fix | Delete
except ImportError:
[1133] Fix | Delete
# Simple Python implementation if _thread._excepthook() is not available
[1134] Fix | Delete
from traceback import print_exception as _print_exception
[1135] Fix | Delete
from collections import namedtuple
[1136] Fix | Delete
[1137] Fix | Delete
_ExceptHookArgs = namedtuple(
[1138] Fix | Delete
'ExceptHookArgs',
[1139] Fix | Delete
'exc_type exc_value exc_traceback thread')
[1140] Fix | Delete
[1141] Fix | Delete
def ExceptHookArgs(args):
[1142] Fix | Delete
return _ExceptHookArgs(*args)
[1143] Fix | Delete
[1144] Fix | Delete
def excepthook(args, /):
[1145] Fix | Delete
"""
[1146] Fix | Delete
Handle uncaught Thread.run() exception.
[1147] Fix | Delete
"""
[1148] Fix | Delete
if args.exc_type == SystemExit:
[1149] Fix | Delete
# silently ignore SystemExit
[1150] Fix | Delete
return
[1151] Fix | Delete
[1152] Fix | Delete
if _sys is not None and _sys.stderr is not None:
[1153] Fix | Delete
stderr = _sys.stderr
[1154] Fix | Delete
elif args.thread is not None:
[1155] Fix | Delete
stderr = args.thread._stderr
[1156] Fix | Delete
if stderr is None:
[1157] Fix | Delete
# do nothing if sys.stderr is None and sys.stderr was None
[1158] Fix | Delete
# when the thread was created
[1159] Fix | Delete
return
[1160] Fix | Delete
else:
[1161] Fix | Delete
# do nothing if sys.stderr is None and args.thread is None
[1162] Fix | Delete
return
[1163] Fix | Delete
[1164] Fix | Delete
if args.thread is not None:
[1165] Fix | Delete
name = args.thread.name
[1166] Fix | Delete
else:
[1167] Fix | Delete
name = get_ident()
[1168] Fix | Delete
print(f"Exception in thread {name}:",
[1169] Fix | Delete
file=stderr, flush=True)
[1170] Fix | Delete
_print_exception(args.exc_type, args.exc_value, args.exc_traceback,
[1171] Fix | Delete
file=stderr)
[1172] Fix | Delete
stderr.flush()
[1173] Fix | Delete
[1174] Fix | Delete
[1175] Fix | Delete
def _make_invoke_excepthook():
[1176] Fix | Delete
# Create a local namespace to ensure that variables remain alive
[1177] Fix | Delete
# when _invoke_excepthook() is called, even if it is called late during
[1178] Fix | Delete
# Python shutdown. It is mostly needed for daemon threads.
[1179] Fix | Delete
[1180] Fix | Delete
old_excepthook = excepthook
[1181] Fix | Delete
old_sys_excepthook = _sys.excepthook
[1182] Fix | Delete
if old_excepthook is None:
[1183] Fix | Delete
raise RuntimeError("threading.excepthook is None")
[1184] Fix | Delete
if old_sys_excepthook is None:
[1185] Fix | Delete
raise RuntimeError("sys.excepthook is None")
[1186] Fix | Delete
[1187] Fix | Delete
sys_exc_info = _sys.exc_info
[1188] Fix | Delete
local_print = print
[1189] Fix | Delete
local_sys = _sys
[1190] Fix | Delete
[1191] Fix | Delete
def invoke_excepthook(thread):
[1192] Fix | Delete
global excepthook
[1193] Fix | Delete
try:
[1194] Fix | Delete
hook = excepthook
[1195] Fix | Delete
if hook is None:
[1196] Fix | Delete
hook = old_excepthook
[1197] Fix | Delete
[1198] Fix | Delete
args = ExceptHookArgs([*sys_exc_info(), thread])
[1199] Fix | Delete
[1200] Fix | Delete
hook(args)
[1201] Fix | Delete
except Exception as exc:
[1202] Fix | Delete
exc.__suppress_context__ = True
[1203] Fix | Delete
del exc
[1204] Fix | Delete
[1205] Fix | Delete
if local_sys is not None and local_sys.stderr is not None:
[1206] Fix | Delete
stderr = local_sys.stderr
[1207] Fix | Delete
else:
[1208] Fix | Delete
stderr = thread._stderr
[1209] Fix | Delete
[1210] Fix | Delete
local_print("Exception in threading.excepthook:",
[1211] Fix | Delete
file=stderr, flush=True)
[1212] Fix | Delete
[1213] Fix | Delete
if local_sys is not None and local_sys.excepthook is not None:
[1214] Fix | Delete
sys_excepthook = local_sys.excepthook
[1215] Fix | Delete
else:
[1216] Fix | Delete
sys_excepthook = old_sys_excepthook
[1217] Fix | Delete
[1218] Fix | Delete
sys_excepthook(*sys_exc_info())
[1219] Fix | Delete
finally:
[1220] Fix | Delete
# Break reference cycle (exception stored in a variable)
[1221] Fix | Delete
args = None
[1222] Fix | Delete
[1223] Fix | Delete
return invoke_excepthook
[1224] Fix | Delete
[1225] Fix | Delete
[1226] Fix | Delete
# The timer class was contributed by Itamar Shtull-Trauring
[1227] Fix | Delete
[1228] Fix | Delete
class Timer(Thread):
[1229] Fix | Delete
"""Call a function after a specified number of seconds:
[1230] Fix | Delete
[1231] Fix | Delete
t = Timer(30.0, f, args=None, kwargs=None)
[1232] Fix | Delete
t.start()
[1233] Fix | Delete
t.cancel() # stop the timer's action if it's still waiting
[1234] Fix | Delete
[1235] Fix | Delete
"""
[1236] Fix | Delete
[1237] Fix | Delete
def __init__(self, interval, function, args=None, kwargs=None):
[1238] Fix | Delete
Thread.__init__(self)
[1239] Fix | Delete
self.interval = interval
[1240] Fix | Delete
self.function = function
[1241] Fix | Delete
self.args = args if args is not None else []
[1242] Fix | Delete
self.kwargs = kwargs if kwargs is not None else {}
[1243] Fix | Delete
self.finished = Event()
[1244] Fix | Delete
[1245] Fix | Delete
def cancel(self):
[1246] Fix | Delete
"""Stop the timer if it hasn't finished yet."""
[1247] Fix | Delete
self.finished.set()
[1248] Fix | Delete
[1249] Fix | Delete
def run(self):
[1250] Fix | Delete
self.finished.wait(self.interval)
[1251] Fix | Delete
if not self.finished.is_set():
[1252] Fix | Delete
self.function(*self.args, **self.kwargs)
[1253] Fix | Delete
self.finished.set()
[1254] Fix | Delete
[1255] Fix | Delete
[1256] Fix | Delete
# Special thread class to represent the main thread
[1257] Fix | Delete
[1258] Fix | Delete
class _MainThread(Thread):
[1259] Fix | Delete
[1260] Fix | Delete
def __init__(self):
[1261] Fix | Delete
Thread.__init__(self, name="MainThread", daemon=False)
[1262] Fix | Delete
self._set_tstate_lock()
[1263] Fix | Delete
self._started.set()
[1264] Fix | Delete
self._set_ident()
[1265] Fix | Delete
if _HAVE_THREAD_NATIVE_ID:
[1266] Fix | Delete
self._set_native_id()
[1267] Fix | Delete
with _active_limbo_lock:
[1268] Fix | Delete
_active[self._ident] = self
[1269] Fix | Delete
[1270] Fix | Delete
[1271] Fix | Delete
# Dummy thread class to represent threads not started here.
[1272] Fix | Delete
# These aren't garbage collected when they die, nor can they be waited for.
[1273] Fix | Delete
# If they invoke anything in threading.py that calls current_thread(), they
[1274] Fix | Delete
# leave an entry in the _active dict forever after.
[1275] Fix | Delete
# Their purpose is to return *something* from current_thread().
[1276] Fix | Delete
# They are marked as daemon threads so we won't wait for them
[1277] Fix | Delete
# when we exit (conform previous semantics).
[1278] Fix | Delete
[1279] Fix | Delete
class _DummyThread(Thread):
[1280] Fix | Delete
[1281] Fix | Delete
def __init__(self):
[1282] Fix | Delete
Thread.__init__(self, name=_newname("Dummy-%d"), daemon=True)
[1283] Fix | Delete
[1284] Fix | Delete
self._started.set()
[1285] Fix | Delete
self._set_ident()
[1286] Fix | Delete
if _HAVE_THREAD_NATIVE_ID:
[1287] Fix | Delete
self._set_native_id()
[1288] Fix | Delete
with _active_limbo_lock:
[1289] Fix | Delete
_active[self._ident] = self
[1290] Fix | Delete
[1291] Fix | Delete
def _stop(self):
[1292] Fix | Delete
pass
[1293] Fix | Delete
[1294] Fix | Delete
def is_alive(self):
[1295] Fix | Delete
assert not self._is_stopped and self._started.is_set()
[1296] Fix | Delete
return True
[1297] Fix | Delete
[1298] Fix | Delete
def join(self, timeout=None):
[1299] Fix | Delete
assert False, "cannot join a dummy thread"
[1300] Fix | Delete
[1301] Fix | Delete
[1302] Fix | Delete
# Global API functions
[1303] Fix | Delete
[1304] Fix | Delete
def current_thread():
[1305] Fix | Delete
"""Return the current Thread object, corresponding to the caller's thread of control.
[1306] Fix | Delete
[1307] Fix | Delete
If the caller's thread of control was not created through the threading
[1308] Fix | Delete
module, a dummy thread object with limited functionality is returned.
[1309] Fix | Delete
[1310] Fix | Delete
"""
[1311] Fix | Delete
try:
[1312] Fix | Delete
return _active[get_ident()]
[1313] Fix | Delete
except KeyError:
[1314] Fix | Delete
return _DummyThread()
[1315] Fix | Delete
[1316] Fix | Delete
currentThread = current_thread
[1317] Fix | Delete
[1318] Fix | Delete
def active_count():
[1319] Fix | Delete
"""Return the number of Thread objects currently alive.
[1320] Fix | Delete
[1321] Fix | Delete
The returned count is equal to the length of the list returned by
[1322] Fix | Delete
enumerate().
[1323] Fix | Delete
[1324] Fix | Delete
"""
[1325] Fix | Delete
with _active_limbo_lock:
[1326] Fix | Delete
return len(_active) + len(_limbo)
[1327] Fix | Delete
[1328] Fix | Delete
activeCount = active_count
[1329] Fix | Delete
[1330] Fix | Delete
def _enumerate():
[1331] Fix | Delete
# Same as enumerate(), but without the lock. Internal use only.
[1332] Fix | Delete
return list(_active.values()) + list(_limbo.values())
[1333] Fix | Delete
[1334] Fix | Delete
def enumerate():
[1335] Fix | Delete
"""Return a list of all Thread objects currently alive.
[1336] Fix | Delete
[1337] Fix | Delete
The list includes daemonic threads, dummy thread objects created by
[1338] Fix | Delete
current_thread(), and the main thread. It excludes terminated threads and
[1339] Fix | Delete
threads that have not yet been started.
[1340] Fix | Delete
[1341] Fix | Delete
"""
[1342] Fix | Delete
with _active_limbo_lock:
[1343] Fix | Delete
return list(_active.values()) + list(_limbo.values())
[1344] Fix | Delete
[1345] Fix | Delete
from _thread import stack_size
[1346] Fix | Delete
[1347] Fix | Delete
# Create the main thread object,
[1348] Fix | Delete
# and make it available for the interpreter
[1349] Fix | Delete
# (Py_Main) as threading._shutdown.
[1350] Fix | Delete
[1351] Fix | Delete
_main_thread = _MainThread()
[1352] Fix | Delete
[1353] Fix | Delete
def _shutdown():
[1354] Fix | Delete
"""
[1355] Fix | Delete
Wait until the Python thread state of all non-daemon threads get deleted.
[1356] Fix | Delete
"""
[1357] Fix | Delete
# Obscure: other threads may be waiting to join _main_thread. That's
[1358] Fix | Delete
# dubious, but some code does it. We can't wait for C code to release
[1359] Fix | Delete
# the main thread's tstate_lock - that won't happen until the interpreter
[1360] Fix | Delete
# is nearly dead. So we release it here. Note that just calling _stop()
[1361] Fix | Delete
# isn't enough: other threads may already be waiting on _tstate_lock.
[1362] Fix | Delete
if _main_thread._is_stopped:
[1363] Fix | Delete
# _shutdown() was already called
[1364] Fix | Delete
return
[1365] Fix | Delete
[1366] Fix | Delete
# Main thread
[1367] Fix | Delete
tlock = _main_thread._tstate_lock
[1368] Fix | Delete
# The main thread isn't finished yet, so its thread state lock can't have
[1369] Fix | Delete
# been released.
[1370] Fix | Delete
assert tlock is not None
[1371] Fix | Delete
assert tlock.locked()
[1372] Fix | Delete
tlock.release()
[1373] Fix | Delete
_main_thread._stop()
[1374] Fix | Delete
[1375] Fix | Delete
# Join all non-deamon threads
[1376] Fix | Delete
while True:
[1377] Fix | Delete
with _shutdown_locks_lock:
[1378] Fix | Delete
locks = list(_shutdown_locks)
[1379] Fix | Delete
_shutdown_locks.clear()
[1380] Fix | Delete
[1381] Fix | Delete
if not locks:
[1382] Fix | Delete
break
[1383] Fix | Delete
[1384] Fix | Delete
for lock in locks:
[1385] Fix | Delete
# mimick Thread.join()
[1386] Fix | Delete
lock.acquire()
[1387] Fix | Delete
lock.release()
[1388] Fix | Delete
[1389] Fix | Delete
# new threads can be spawned while we were waiting for the other
[1390] Fix | Delete
# threads to complete
[1391] Fix | Delete
[1392] Fix | Delete
[1393] Fix | Delete
def main_thread():
[1394] Fix | Delete
"""Return the main thread object.
[1395] Fix | Delete
[1396] Fix | Delete
In normal conditions, the main thread is the thread from which the
[1397] Fix | Delete
Python interpreter was started.
[1398] Fix | Delete
"""
[1399] Fix | Delete
return _main_thread
[1400] Fix | Delete
[1401] Fix | Delete
# get thread-local implementation, either from the thread
[1402] Fix | Delete
# module, or from the python fallback
[1403] Fix | Delete
[1404] Fix | Delete
try:
[1405] Fix | Delete
from _thread import _local as local
[1406] Fix | Delete
except ImportError:
[1407] Fix | Delete
from _threading_local import local
[1408] Fix | Delete
[1409] Fix | Delete
[1410] Fix | Delete
def _after_fork():
[1411] Fix | Delete
"""
[1412] Fix | Delete
Cleanup threading module state that should not exist after a fork.
[1413] Fix | Delete
"""
[1414] Fix | Delete
# Reset _active_limbo_lock, in case we forked while the lock was held
[1415] Fix | Delete
# by another (non-forked) thread. http://bugs.python.org/issue874900
[1416] Fix | Delete
global _active_limbo_lock, _main_thread
[1417] Fix | Delete
global _shutdown_locks_lock, _shutdown_locks
[1418] Fix | Delete
_active_limbo_lock = _allocate_lock()
[1419] Fix | Delete
[1420] Fix | Delete
# fork() only copied the current thread; clear references to others.
[1421] Fix | Delete
new_active = {}
[1422] Fix | Delete
[1423] Fix | Delete
try:
[1424] Fix | Delete
current = _active[get_ident()]
[1425] Fix | Delete
except KeyError:
[1426] Fix | Delete
# fork() was called in a thread which was not spawned
[1427] Fix | Delete
# by threading.Thread. For example, a thread spawned
[1428] Fix | Delete
# by thread.start_new_thread().
[1429] Fix | Delete
current = _MainThread()
[1430] Fix | Delete
[1431] Fix | Delete
_main_thread = current
[1432] Fix | Delete
[1433] Fix | Delete
# reset _shutdown() locks: threads re-register their _tstate_lock below
[1434] Fix | Delete
_shutdown_locks_lock = _allocate_lock()
[1435] Fix | Delete
_shutdown_locks = set()
[1436] Fix | Delete
[1437] Fix | Delete
with _active_limbo_lock:
[1438] Fix | Delete
# Dangling thread instances must still have their locks reset,
[1439] Fix | Delete
# because someone may join() them.
[1440] Fix | Delete
threads = set(_enumerate())
[1441] Fix | Delete
threads.update(_dangling)
[1442] Fix | Delete
for thread in threads:
[1443] Fix | Delete
# Any lock/condition variable may be currently locked or in an
[1444] Fix | Delete
# invalid state, so we reinitialize them.
[1445] Fix | Delete
if thread is current:
[1446] Fix | Delete
# There is only one active thread. We reset the ident to
[1447] Fix | Delete
# its new value since it can have changed.
[1448] Fix | Delete
thread._reset_internal_locks(True)
[1449] Fix | Delete
ident = get_ident()
[1450] Fix | Delete
thread._ident = ident
[1451] Fix | Delete
new_active[ident] = thread
[1452] Fix | Delete
else:
[1453] Fix | Delete
# All the others are already stopped.
[1454] Fix | Delete
thread._reset_internal_locks(False)
[1455] Fix | Delete
thread._stop()
[1456] Fix | Delete
[1457] Fix | Delete
_limbo.clear()
[1458] Fix | Delete
_active.clear()
[1459] Fix | Delete
_active.update(new_active)
[1460] Fix | Delete
assert len(_active) == 1
[1461] Fix | Delete
[1462] Fix | Delete
[1463] Fix | Delete
if hasattr(_os, "register_at_fork"):
[1464] Fix | Delete
_os.register_at_fork(after_in_child=_after_fork)
[1465] Fix | Delete
[1466] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function