]> granicus.if.org Git - python/commitdiff
Use PyThreadState_DeleteCurrent() instead of PyThreadState_Delete()
authorGuido van Rossum <guido@python.org>
Tue, 23 Jan 2001 01:47:18 +0000 (01:47 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 23 Jan 2001 01:47:18 +0000 (01:47 +0000)
and PyEval_ReleaseThread().

This fixes SF bug #125673 PyThreadState_Delete: invalid tstate (Unix
only?).

Modules/threadmodule.c

index e0afde5ea9e1a8439bea17eb66e04da05a4b0fd4..48f1f36cdac8a116431f833e1e8cf49d216f075b 100644 (file)
@@ -204,8 +204,7 @@ t_bootstrap(void *boot_raw)
        else
                Py_DECREF(res);
        PyThreadState_Clear(tstate);
-       PyEval_ReleaseThread(tstate);
-       PyThreadState_Delete(tstate);
+       PyThreadState_DeleteCurrent();
        PyThread_exit_thread();
 }