Skip to content

Commit c05f2f7

Browse files
committed
always load the _dummy_thread module so it is cached, even when we cache in a context that uses real threads
1 parent 4ac6ccd commit c05f2f7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

graalpython/lib-graalpython/_thread.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ def _set_sentinel():
5454
return LockType()
5555

5656

57-
if not _sysconfig.get_config_vars().get('WITH_THREAD'):
58-
def load():
59-
import sys
60-
filename = sys.graal_python_stdlib_home + ("/_dummy_thread.py")
61-
_dummy_thread = __import__(filename, "_thread")
57+
def load():
58+
import sys
59+
filename = sys.graal_python_stdlib_home + ("/_dummy_thread.py")
60+
_dummy_thread = __import__(filename, "_thread")
61+
if not _sysconfig.get_config_vars().get('WITH_THREAD'):
6262
sys.modules["_thread"] = _dummy_thread
63-
load()
64-
del load
63+
load()
64+
del load

0 commit comments

Comments
 (0)