()
| 96 | |
| 97 | |
| 98 | def _python_exit(): |
| 99 | global _global_shutdown |
| 100 | _global_shutdown = True |
| 101 | items = list(_threads_wakeups.items()) |
| 102 | for _, thread_wakeup in items: |
| 103 | # call not protected by ProcessPoolExecutor._shutdown_lock |
| 104 | thread_wakeup.wakeup() |
| 105 | for t, _ in items: |
| 106 | t.join() |
| 107 | |
| 108 | # Register for `_python_exit()` to be called just before joining all |
| 109 | # non-daemon threads. This is used instead of `atexit.register()` for |