Note that you can ‘solve’ the problem in the REPL by adding a sleep after the notify, in order to give enough time to print to stdio, confirming @BioTurboNick 's hypothesis.
No sleep
julia> e = Base.Event();
julia> [Threads.@spawn begin wait(e); println("done$i") end for i in 1:10]
10-element Vector{Task}:
Task (runnable) @0x0000015fc48f64e0
Task (runnable) @0x0000015fc48f66d0
Task (runnable) @0x0000015fc48f68c0
Task (runnable) @0x0000015fc48f6ab0
Task (runnable) @0x0000015fc48f6ca0
Task (runnable) @0x0000015fc48f6e90
Task (runnable) @0x0000015fc48f7080
Task (runnable) @0x0000015fc48f7270
Task (runnable) @0x0000015fc48f7460
Task (runnable) @0x0000015fc48f7650
julia> notify(e)
done7
julia> done9
julia> done8
done1
done2
done3
done10
done4
done6
done5
With sleep
julia> e = Base.Event();
julia> [Threads.@spawn begin wait(e); println("done$i") end for i in 1:10]
10-element Vector{Task}:
Task (runnable) @0x0000015fc48f7840
Task (runnable) @0x0000015fc48f7a30
Task (runnable) @0x0000015fc48f7c20
Task (runnable) @0x0000015fc48f7e10
Task (runnable) @0x0000015f9ba5c010
Task (runnable) @0x0000015f9ba5c200
Task (runnable) @0x0000015f9ba5c3f0
Task (runnable) @0x0000015f9ba5c5e0
Task (runnable) @0x0000015f9ba5c7d0
Task (runnable) @0x0000015f9ba5c9c0
julia> notify(e); sleep(0.1)
done3
done5
done4
done9
done7
done1
done6
done8
done2
done10