https://github.com/JuliaLang/julia
Raw File
Tip revision: c0c854e68f3977a7fcd18bdbe798063ec60f13ee authored by Nathan Daly on 04 February 2022, 15:39:21 UTC
Fix pointer casting warnings by adding the appropriate casts
Tip revision: c0c854e
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