Hi, for some reason the code snippet below hangs. Does any one have an explanation as to why this hangs
using distributed
addprocs(2)
tasks = Vector{Task}(undef,4)
@sync for i in 1:4
tasks[i] = Threads.@spawn begin
pmap(x->x, WorkerPool(workers()), 1:10)
end
end
fetch.(tasks)
Surprisingly if i first run pmap(x->x, WorkerPool(workers()), 1:10)
before running the code above everything works as expected.