Skip to content

Commit 944dce9

Browse files
committed
Update nthreads(pool)
Now returns `threadpoolsize(pool)`.
1 parent dc68ffc commit 944dce9

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

base/threadingconstructs.jl

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,7 @@ See also `BLAS.get_num_threads` and `BLAS.set_num_threads` in the [`LinearAlgebr
3232
man-linalg) standard library, and `nprocs()` in the [`Distributed`](@ref man-distributed)
3333
standard library and [`Threads.maxthreadid()`](@ref).
3434
"""
35-
function nthreads(pool::Symbol)
36-
if pool === :default
37-
tpid = Int8(0)
38-
elseif pool === :interactive
39-
tpid = Int8(1)
40-
else
41-
error("invalid threadpool specified")
42-
end
43-
return _nthreads_in_pool(tpid)
44-
end
35+
nthreads(pool::Symbol) = threadpoolsize(pool)
4536

4637
function _nthreads_in_pool(tpid::Int8)
4738
p = unsafe_load(cglobal(:jl_n_threads_per_pool, Ptr{Cint}))

0 commit comments

Comments
 (0)