https://github.com/JuliaLang/julia
Raw File
Tip revision: b570bbe09b794e63139612efeee26364a0bb3231 authored by Valentin Churavy on 14 March 2019, 17:50:28 UTC
turn off early jump threading and pass opt_level to SimpleLoopUnroll
Tip revision: b570bbe
stack_overflow.jl
# This file is a part of Julia. License is MIT: https://julialang.org/license

using Test

# helper function for returning stderr and stdout
# from running a command (ignoring failure status)
function readchomperrors(exename::Cmd)
    out = Base.PipeEndpoint()
    err = Base.PipeEndpoint()
    p = run(exename, devnull, out, err, wait=false)
    o = @async(readchomp(out))
    e = @async(readchomp(err))
    return (success(p), fetch(o), fetch(e))
end

let exename = Base.julia_cmd()
    @show readchomperrors(`$exename -e "f() = f(); f()"`)
    @show readchomperrors(`$exename -e "f() = f(); fetch(@schedule f())"`)
end
back to top