Issue 24342: Let wrapper set by sys.set_coroutine_wrapper fail gracefully

This commit is contained in:
Yury Selivanov 2015-06-02 18:43:51 -04:00
parent 231d90609b
commit aab3c4a211
6 changed files with 68 additions and 10 deletions

View file

@ -213,6 +213,7 @@ new_threadstate(PyInterpreterState *interp, int init)
tstate->on_delete_data = NULL;
tstate->coroutine_wrapper = NULL;
tstate->in_coroutine_wrapper = 0;
if (init)
_PyThreadState_Init(tstate);