https://github.com/JuliaLang/julia
Raw File
Tip revision: b06a24a7eed4464e50f4ee594c3a303ad543c42b authored by Dilum Aluthge on 02 October 2022, 20:30:28 UTC
[`release-1.7` branch] CI (Buildkite): remove the `.buildkite` folder (#44378)
Tip revision: b06a24a
profile_spawnmany_exec.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Profile

function spawnmany(n)
    if n > 2
        m = n รท 2
        t = Threads.@spawn spawnmany(m)
        spawnmany(m)
        wait(t)
    end
end

@profile spawnmany(parse(Int, get(ENV, "NTASKS", "2000000")))
back to top