mirror of
https://github.com/python/cpython.git
synced 2025-07-12 05:45:15 +00:00
New thread.c from Sjoerd, supports _exit_prog(). Use this in goaway()
to avoid hanging in cleanup().
This commit is contained in:
parent
0297512a08
commit
f9f2e82fca
5 changed files with 253 additions and 92 deletions
|
@ -361,6 +361,10 @@ fatal(msg)
|
|||
|
||||
/* Clean up and exit */
|
||||
|
||||
#ifdef USE_THREAD
|
||||
extern int threads_started;
|
||||
#endif
|
||||
|
||||
void
|
||||
goaway(sts)
|
||||
int sts;
|
||||
|
@ -375,7 +379,10 @@ goaway(sts)
|
|||
|
||||
(void) save_thread();
|
||||
donecalls();
|
||||
exit_prog(sts);
|
||||
if (threads_started)
|
||||
_exit_prog(sts);
|
||||
else
|
||||
exit_prog(sts);
|
||||
|
||||
#else /* USE_THREAD */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue