mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 11:49:12 +00:00 
			
		
		
		
	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
					
				
					 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 */
 | 
						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…
	
	Add table
		Add a link
		
	
		Reference in a new issue