diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-09-07 21:38:37 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-09-07 21:38:37 (GMT) |
commit | 7b4769937fb612d576b6829c3b834f3dd31752f1 (patch) | |
tree | 274bf4dd801bd8ffdc066658ec63c1f9cecb3afa /Lib/_dummy_thread.py | |
parent | eda7c641515f8af1f8700634b93eba859967379c (diff) | |
download | cpython-7b4769937fb612d576b6829c3b834f3dd31752f1.zip cpython-7b4769937fb612d576b6829c3b834f3dd31752f1.tar.gz cpython-7b4769937fb612d576b6829c3b834f3dd31752f1.tar.bz2 |
Issue #18808: Thread.join() now waits for the underlying thread state to be destroyed before returning.
This prevents unpredictable aborts in Py_EndInterpreter() when some non-daemon threads are still running.
Diffstat (limited to 'Lib/_dummy_thread.py')
-rw-r--r-- | Lib/_dummy_thread.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/_dummy_thread.py b/Lib/_dummy_thread.py index 13b1f26..b67cfb9 100644 --- a/Lib/_dummy_thread.py +++ b/Lib/_dummy_thread.py @@ -81,6 +81,10 @@ def stack_size(size=None): raise error("setting thread stack size not supported") return 0 +def _set_sentinel(): + """Dummy implementation of _thread._set_sentinel().""" + return LockType() + class LockType(object): """Class implementing dummy implementation of _thread.LockType. |