Multithreading spits out junk at initialization
MarcBerliner opened this issue · 2 comments
MarcBerliner commented
For example (scroll right to see it all):
julia> a = []
Any[]
julia> Threads.@threads for i in ProgressBar(1:1000)
push!(a, i * 2)
end
0.0%0.0%┣┣ ┫ 0/1000 [00:00<00:-50, -20.00/1000 [00:00<00:-50, -20.0 it/s]0.1%┣ ┫100.0%┣██████████████████████████████████┫ 1000/1000 [00:00<00:00, 19648.2 it/s]
This seems to be a function of the number of threads used. This is using 2, but if I increase it the amount of junk increases too. I'm using julia 1.5.2 on macOS.
khdlr commented
Thanks for catching this, it's really weird behaviour that stems from a missing lock in the progress bar initialization. #29 should fix this.
khdlr commented
This is now fixed as of v0.8