]> granicus.if.org Git - python/commitdiff
Fix crash in test on HP-UX. Apparently, it's not possible to delete a lock if
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 28 Oct 2006 21:17:51 +0000 (21:17 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 28 Oct 2006 21:17:51 +0000 (21:17 +0000)
it's held (even by the current thread).

Will backport.

Modules/_testcapimodule.c

index edfe8adc6764923547e14ed88952acfcafeb228f..b11f0aebfc1135a0a52ffc2f40d3ceaa1c9f55b4 100644 (file)
@@ -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;
 }