diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-05-04 18:02:30 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-05-04 18:02:30 (GMT) |
commit | 0d5e52d3469a310001afe50689f77ddba6d554d1 (patch) | |
tree | 0427334f46907890af771153a28f2c39441a8d89 /Python/thread_pthread.h | |
parent | e548f5a0018fb44ed3a2a365ff0c8c87e397eedd (diff) | |
download | cpython-0d5e52d3469a310001afe50689f77ddba6d554d1.zip cpython-0d5e52d3469a310001afe50689f77ddba6d554d1.tar.gz cpython-0d5e52d3469a310001afe50689f77ddba6d554d1.tar.bz2 |
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 ffc791c..6bc9d55 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 |