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

Function current_thread

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

Return the current Thread object, corresponding to the caller's thread of control. If the caller's thread of control was not created through the threading module, a dummy thread object with limited functionality is returned.

()

Source from the content-addressed store, hash-verified

1451# Global API functions
1452
1453def current_thread():
1454 """Return the current Thread object, corresponding to the caller's thread of control.
1455
1456 If the caller's thread of control was not created through the threading
1457 module, a dummy thread object with limited functionality is returned.
1458
1459 """
1460 try:
1461 return _active[get_ident()]
1462 except KeyError:
1463 return _DummyThread()
1464
1465def currentThread():
1466 """Return the current Thread object, corresponding to the caller's thread of control.

Callers 5

get_dictMethod · 0.90
create_dictMethod · 0.90
__init__Method · 0.85
joinMethod · 0.85
currentThreadFunction · 0.85

Calls 1

_DummyThreadClass · 0.85

Tested by

no test coverage detected