Skip to content

Commit 25dcd3c

Browse files
committed
threadpool ref
1 parent 69b9950 commit 25dcd3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/nnpack/NNPACK.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ end
99
include(depsjl_path)
1010

1111
const nnlib_interface_path = joinpath(dirname(@__FILE__), "interface.jl")
12-
global shared_threadpool = Ref(C_NULL)
12+
const shared_threadpool = Ref(C_NULL)
1313

1414
@init begin
1515
check_deps()
@@ -24,5 +24,5 @@ global shared_threadpool = Ref(C_NULL)
2424
catch
2525
global NNPACK_CPU_THREADS = 4
2626
end
27-
global shared_threadpool = Ref(pthreadpool_create(NNPACK_CPU_THREADS))
27+
shared_threadpool[] = pthreadpool_create(NNPACK_CPU_THREADS)
2828
end

0 commit comments

Comments
 (0)