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 30f0612 commit 8a86e37Copy full SHA for 8a86e37
test/Core.jl
@@ -838,8 +838,9 @@ end
838
end
839
840
@testitem "on_main_thread" begin
841
- task = Threads.@spawn PythonCall.C.on_main_thread() do; Threads.threadid(); end
842
- @test fetch(task) == 1
+ refid = PythonCall.C.on_main_thread() do; Threads.threadid(); end
+ tasks = [Threads.@spawn(PythonCall.C.on_main_thread() do; Threads.threadid(); end) for _ in 1:20]
843
+ @test all(t -> fetch(t) == refid, tasks)
844
@test_throws DivideError redirect_stderr(devnull) do
845
PythonCall.C.on_main_thread() do
846
throw(DivideError())
0 commit comments