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). Will backport.
This commit is contained in:
parent
a5ccda95f2
commit
97a57220e8
|
@ -667,6 +667,9 @@ test_thread_state(PyObject *self, PyObject *args)
|
||||||
PyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */
|
PyThread_acquire_lock(thread_done, 1); /* wait for thread to finish */
|
||||||
Py_END_ALLOW_THREADS
|
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);
|
PyThread_free_lock(thread_done);
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue