diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2011-05-04 20:02:30 +0200 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-05-04 20:02:30 +0200 |
| commit | 89ae6ab2a2cfece70bf55c2a314376093e6a1a41 (patch) | |
| tree | 7695c65229b5132eecc4c4f7105ee249792fe832 /Python/thread_pthread.h | |
| parent | 937d0116fec9486da27788e281287878396742be (diff) | |
| download | cpython-89ae6ab2a2cfece70bf55c2a314376093e6a1a41.tar.gz | |
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.
Diffstat (limited to 'Python/thread_pthread.h')
| -rw-r--r-- | Python/thread_pthread.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index ffc791c578..6bc9d55781 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -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 |
