mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
Backport 52503:
Fix crash in test on HP-UX. Apparently, it's not possible to delete a lock if it's held (even by the current thread).
This commit is contained in:
parent
7e3ec048f9
commit
c975b9477b
1 changed files with 3 additions and 0 deletions
|
@ -667,6 +667,9 @@ test_thread_state(PyObject *self, PyObject *args)
|
|||
PyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */
|
||||
Py_END_ALLOW_THREADS
|
||||
|
||||
/* Release lock we acquired above. This is required on HP-UX. */
|
||||
PyThread_release_lock(thread_done);
|
||||
|
||||
PyThread_free_lock(thread_done);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue