You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple error handling of a spawned task is currently sub optimal:
The first error returns a failed task, but breaks the WorkerUtilities
The second error is just a runnable task.
How could we assign the error to the task and finish the task?
julia -t 2
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.5.3 (2020-11-09)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using WorkerUtilities
julia> WorkerUtilities.init()
julia> resp = WorkerUtilities.@spawn(sqrt(-1))
Task (failed) @0x00007f96267c5120
DomainError with -1.0:
sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).
throw_complex_domainerror(::Symbol, ::Float64) at ./math.jl:33
sqrt at ./math.jl:573 [inlined]
sqrt(::Int64) at ./math.jl:599
(::var"#1#2")() at ./task.jl:112
julia> resp
Task (failed) @0x00007f96267c5120
DomainError with -1.0:
sqrt will only return a complex result if called with a complex argument. Try sqrt(Complex(x)).
throw_complex_domainerror(::Symbol, ::Float64) at ./math.jl:33
sqrt at ./math.jl:573 [inlined]
sqrt(::Int64) at ./math.jl:599
(::var"#1#2")() at ./task.jl:112
julia> resp = WorkerUtilities.@spawn(sqrt(-2))
# Takes forever...
The text was updated successfully, but these errors were encountered:
Multiple error handling of a spawned task is currently sub optimal:
How could we assign the error to the task and
finish
the task?The text was updated successfully, but these errors were encountered: