swh:1:snp:a72e953ecd624a7df6e6196bbdd05851996c5e40
Raw File
Tip revision: afc1f3101db16fcd4ae9f04fd9f217a6f827d5c7 authored by Steven G. Johnson on 13 February 2024, 18:55:18 UTC
doc tweaks
Tip revision: afc1f31
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