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 d95ab4f commit 1660579Copy full SHA for 1660579
test/GIL.jl
@@ -3,7 +3,7 @@
3
# GIL, these can happen in parallel if Julia has at least 2 threads.
4
function threaded_sleep()
5
PythonCall.GIL.unlock() do
6
- Threads.@threads for i = 1:2
+ Threads.@threads :static for i = 1:2
7
PythonCall.GIL.lock() do
8
pyimport("time").sleep(1)
9
end
@@ -24,7 +24,7 @@ end
24
# This calls Python's time.sleep(1) twice concurrently. Since sleep() unlocks the
25
26
27
- PythonCall.GIL.@unlock Threads.@threads for i = 1:2
+ PythonCall.GIL.@unlock Threads.@threads :static for i = 1:2
28
PythonCall.GIL.@lock pyimport("time").sleep(1)
29
30
0 commit comments