-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
parallelismParallel or distributed computationParallel or distributed computation
Description
This might be related to #35379. MWE:
output = []
asyncmap!(identity, output, 1:20)
This gives the following output:
ERROR: InvalidStateException: Channel is closed.
Stacktrace:
[1] check_channel_state
@ ./channels.jl:174 [inlined]
[2] put!(c::Channel{Any}, v::Tuple{Int64, Tuple{Int64}})
@ Base ./channels.jl:319
[3] iterate(itr::Base.AsyncCollector, state::Base.AsyncCollectorState)
@ Base ./asyncmap.jl:335
[4] foreach
@ ./abstractarray.jl:2774 [inlined]
[5] #asyncmap!#954
@ ./asyncmap.jl:405 [inlined]
[6] asyncmap!(::Function, ::Vector{Any}, ::UnitRange{Int64})
@ Base ./asyncmap.jl:404
[7] top-level scope
@ REPL[1]:1
Using asyncmap
works fine. The error message is quite cryptic and does not explain the underlying problem (a mismatch between array sizes). In comparison, map!
does not throw an error with the above code (it does not do anything).
Metadata
Metadata
Assignees
Labels
parallelismParallel or distributed computationParallel or distributed computation