File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 11@testitem " GC.gc()" begin
22 let
33 pyobjs = map (pylist, 1 : 100 )
4- PythonCall. GIL. @unlock Threads. @threads for obj in pyobjs
5- finalize (obj)
4+ PythonCall. GIL. @unlock begin
5+ Threads. @threads for obj in pyobjs
6+ finalize (obj)
7+ end
8+ Threads. nthreads () > 1 && @test ! isempty (PythonCall. GC. QUEUE. items)
69 end
710 end
8- Threads. nthreads () > 1 && @test ! isempty (PythonCall. GC. QUEUE. items)
911 PythonCall. GC. gc ()
1012 @test isempty (PythonCall. GC. QUEUE. items)
1113end
1214
1315@testitem " GC.GCHook" begin
1416 let
1517 pyobjs = map (pylist, 1 : 100 )
16- PythonCall. GIL. @unlock Threads. @threads for obj in pyobjs
17- finalize (obj)
18+ PythonCall. GIL. @unlock begin
19+ Threads. @threads for obj in pyobjs
20+ finalize (obj)
21+ end
22+ Threads. nthreads () > 1 && @test ! isempty (PythonCall. GC. QUEUE. items)
1823 end
1924 end
20- Threads. nthreads () > 1 && @test ! isempty (PythonCall. GC. QUEUE. items)
2125 GC. gc ()
2226 @test isempty (PythonCall. GC. QUEUE. items)
2327end
You can’t perform that action at this time.
0 commit comments