Issue #1856: Avoid crashes and lockups when daemon threads run while the

interpreter is shutting down; instead, these threads are now killed when
they try to take the GIL.
This commit is contained in:
Antoine Pitrou 2011-05-04 20:02:30 +02:00
parent e548f5a001
commit 0d5e52d346
6 changed files with 69 additions and 7 deletions

View file

@ -250,9 +250,9 @@ void
PyThread_exit_thread(void)
{
dprintf(("PyThread_exit_thread called\n"));
if (!initialized) {
if (!initialized)
exit(0);
}
pthread_exit(0);
}
#ifdef USE_SEMAPHORES