https://github.com/JuliaLang/julia
Raw File
Tip revision: d9b5aad269a0da4bd219998d1147a55153cb7ded authored by Valentin Churavy on 14 January 2022, 17:21:19 UTC
add hwloc as a dependency
Tip revision: d9b5aad
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