Skip to content

Commit 273bbca

Browse files
committed
rename to :foreign
1 parent c72a829 commit 273bbca

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

base/task.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ function enq_work(t::Task)
798798
else
799799
@label not_sticky
800800
tp = Threads.threadpool(t)
801-
if tp === :unassociated || Threads.threadpoolsize(tp) == 1
801+
if tp === :foreign || Threads.threadpoolsize(tp) == 1
802802
# There's only one thread in the task's assigned thread pool;
803803
# use its work queue.
804804
tid = (tp === :interactive) ? 1 : Threads.threadpoolsize(:interactive)+1

base/threadingconstructs.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function _tpid_to_sym(tpid::Int8)
6464
elseif tpid == 1
6565
return :default
6666
elseif tpid == -1
67-
return :unassociated
67+
return :foreign
6868
else
6969
throw(ArgumentError("Unrecognized threadpool id $tpid"))
7070
end
@@ -75,7 +75,7 @@ function _sym_to_tpid(tp::Symbol)
7575
return Int8(0)
7676
elseif tp === :default
7777
return Int8(1)
78-
elseif tp == :unassociated
78+
elseif tp == :foreign
7979
return Int8(-1)
8080
else
8181
throw(ArgumentError("Unrecognized threadpool name `$(repr(tp))`"))
@@ -85,7 +85,7 @@ end
8585
"""
8686
Threads.threadpool(tid = threadid()) -> Symbol
8787
88-
Returns the specified thread's threadpool; either `:default`, `:interactive`, or `:unassociated`.
88+
Returns the specified thread's threadpool; either `:default`, `:interactive`, or `:foreign`.
8989
"""
9090
function threadpool(tid = threadid())
9191
tpid = ccall(:jl_threadpoolid, Int8, (Int16,), tid-1)
@@ -112,8 +112,8 @@ See also: `BLAS.get_num_threads` and `BLAS.set_num_threads` in the
112112
function threadpoolsize(pool::Symbol = :default)
113113
if pool === :default || pool === :interactive
114114
tpid = _sym_to_tpid(pool)
115-
elseif pool == :unassociated
116-
error("Threadpool size of `:unassociated` is indeterminant")
115+
elseif pool == :foreign
116+
error("Threadpool size of `:foreign` is indeterminant")
117117
else
118118
error("invalid threadpool specified")
119119
end

0 commit comments

Comments
 (0)