# else the thread is still running, and we have no way to kill it
+ def test_limbo_cleanup(self):
+ # Issue 7481: Failure to start thread should cleanup the limbo map.
+ def fail_new_thread(*args):
+ _start_new_thread = threading._start_new_thread
+ threading._start_new_thread = fail_new_thread
+ t = threading.Thread(target=lambda: None)
+ "Failed to cleanup _limbo map on failure of Thread.start()."
+ threading._start_new_thread = _start_new_thread
# Issue 1402: the PyGILState_Ensure / _Release functions may be called
# very late on python exit: on deallocation of a running thread for