[Python-checkins] r52509 - python/branches/release25-maint/Modules/_testcapimodule.c

neal.norwitz python-checkins at python.org
Sat Oct 28 23:37:43 CEST 2006


Author: neal.norwitz
Date: Sat Oct 28 23:37:42 2006
New Revision: 52509

Modified:
   python/branches/release25-maint/Modules/_testcapimodule.c
Log:
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).


Modified: python/branches/release25-maint/Modules/_testcapimodule.c
==============================================================================
--- python/branches/release25-maint/Modules/_testcapimodule.c	(original)
+++ python/branches/release25-maint/Modules/_testcapimodule.c	Sat Oct 28 23:37:42 2006
@@ -667,6 +667,9 @@
 	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;
 }


More information about the Python-checkins mailing list