Commits

Armin Rigo committed 107b3a5

pom pom pom

Comments (0)

Files changed (1)

pypy/module/cpyext/pystate.py

     interpreter lock must be held."""
     Py_DecRef(space, tstate.c_dict)
     tstate.c_dict = lltype.nullptr(PyObject.TO)
-    space.threadlocals.leave_thread(space)
+    if space.config.translation.thread:
+        space.threadlocals.leave_thread(space)
+    #else: nothing to do
     space.getexecutioncontext().cleanup_cpyext_state()
     rthread.gc_thread_die()