mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -4,7 +4,7 @@ Various tests for synchronization primitives.
|
|||
|
||||
import sys
|
||||
import time
|
||||
from _thread import start_new_thread, get_ident, TIMEOUT_MAX
|
||||
from _thread import start_new_thread, TIMEOUT_MAX
|
||||
import threading
|
||||
import unittest
|
||||
|
||||
|
@ -31,7 +31,7 @@ class Bunch(object):
|
|||
self.finished = []
|
||||
self._can_exit = not wait_before_exit
|
||||
def task():
|
||||
tid = get_ident()
|
||||
tid = threading.get_ident()
|
||||
self.started.append(tid)
|
||||
try:
|
||||
f()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue