mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
Close #12028: Make threading._get_ident() public, rename it to
threading.get_ident() and document it. This function was used by _thread.get_ident().
This commit is contained in:
parent
d976098e3b
commit
2a12974bca
12 changed files with 50 additions and 39 deletions
|
@ -173,7 +173,7 @@ class ThreadTests(BaseTestCase):
|
|||
exception = ctypes.py_object(AsyncExc)
|
||||
|
||||
# First check it works when setting the exception from the same thread.
|
||||
tid = _thread.get_ident()
|
||||
tid = threading.get_ident()
|
||||
|
||||
try:
|
||||
result = set_async_exc(ctypes.c_long(tid), exception)
|
||||
|
@ -202,7 +202,7 @@ class ThreadTests(BaseTestCase):
|
|||
|
||||
class Worker(threading.Thread):
|
||||
def run(self):
|
||||
self.id = _thread.get_ident()
|
||||
self.id = threading.get_ident()
|
||||
self.finished = False
|
||||
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue