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.
nthreads(pool)
1 parent dc68ffc commit 944dce9Copy full SHA for 944dce9
base/threadingconstructs.jl
@@ -32,16 +32,7 @@ See also `BLAS.get_num_threads` and `BLAS.set_num_threads` in the [`LinearAlgebr
32
man-linalg) standard library, and `nprocs()` in the [`Distributed`](@ref man-distributed)
33
standard library and [`Threads.maxthreadid()`](@ref).
34
"""
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
+nthreads(pool::Symbol) = threadpoolsize(pool)
45
46
function _nthreads_in_pool(tpid::Int8)
47
p = unsafe_load(cglobal(:jl_n_threads_per_pool, Ptr{Cint}))
0 commit comments