swh:1:snp:a72e953ecd624a7df6e6196bbdd05851996c5e40
Raw File
Tip revision: d518061d6b9557efbfc964e25aed7729641cef90 authored by Jameson Nash on 16 May 2022, 08:40:29 UTC
Revert "Hoist object allocation before inner field initialization (#45153)"
Tip revision: d518061
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() == :default
@test threadpool(2) == :interactive
dtask() = @test threadpool(current_task()) == :default
itask() = @test threadpool(current_task()) == :interactive
dt1 = @spawn dtask()
dt2 = @spawn :default dtask()
it = @spawn :interactive itask()
wait(dt1)
wait(dt2)
wait(it)
back to top