We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 050c572 commit 32cf833Copy full SHA for 32cf833
graalpython/com.oracle.graal.python.test/src/graalpytest.py
@@ -60,9 +60,11 @@ class ThreadPool():
60
if os.environ.get(b"ENABLE_THREADED_GRAALPYTEST") == b"true":
61
maxcnt = min(os.cpu_count(), 16)
62
sleep = time.sleep
63
+ start_new_thread = _thread.start_new_thread
64
print("Running with %d threads" % maxcnt)
65
else:
66
sleep = lambda x: x
67
+ start_new_thread = lambda f, args: f(*args)
68
maxcnt = 1
69
70
@classmethod
@@ -73,7 +75,7 @@ def runner():
73
75
function()
74
76
finally:
77
self.release_token()
- _thread.start_new_thread(runner, ())
78
+ self.start_new_thread(runner, ())
79
self.sleep(0.5)
80
81
0 commit comments