swh:1:snp:a72e953ecd624a7df6e6196bbdd05851996c5e40
Raw File
Tip revision: f87e084be4f5d65f26b69c0b5f0b1ad101709bfe authored by Jishnu Bhattacharya on 20 March 2024, 05:37:41 UTC
Zero for TwicePrecision
Tip revision: f87e084
threadpool_use.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Test
using Base.Threads

@test nthreadpools() == 2
@test threadpool() === :interactive
@test threadpool(2) === :default
@test fetch(Threads.@spawn Threads.threadpool()) === :default
@test fetch(Threads.@spawn :default Threads.threadpool()) === :default
@test fetch(Threads.@spawn :interactive Threads.threadpool()) === :interactive
tp = :default
@test fetch(Threads.@spawn tp Threads.threadpool()) === :default
tp = :interactive
@test fetch(Threads.@spawn tp Threads.threadpool()) === :interactive
tp = :foo
@test_throws ArgumentError Threads.@spawn tp Threads.threadpool()
@test Threads.threadpooltids(:interactive) == [1]
@test Threads.threadpooltids(:default) == [2]
back to top