https://github.com/JuliaLang/julia
Raw File
Tip revision: 7e297def65c658bcc4f86521e04a15478c7cf402 authored by Tim Holy on 16 September 2023, 20:32:51 UTC
Make `min/max` use `isless` even for `Real`
Tip revision: 7e297de
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