mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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
|
@ -557,7 +557,7 @@ class PendingSignalsTests(unittest.TestCase):
|
|||
|
||||
def kill(self, signum):
|
||||
if self.has_pthread_kill:
|
||||
tid = threading.current_thread().ident
|
||||
tid = threading.get_ident()
|
||||
signal.pthread_kill(tid, signum)
|
||||
else:
|
||||
pid = os.getpid()
|
||||
|
@ -589,7 +589,7 @@ class PendingSignalsTests(unittest.TestCase):
|
|||
'need signal.pthread_kill()')
|
||||
def test_pthread_kill(self):
|
||||
signum = signal.SIGUSR1
|
||||
current = threading.current_thread().ident
|
||||
current = threading.get_ident()
|
||||
|
||||
old_handler = signal.signal(signum, self.handler)
|
||||
self.addCleanup(signal.signal, signum, old_handler)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue