Suppose I have this for loop:
for i in 1:100000
1+1
# Let's do some long computations here
end
Those two for loops work:
Threads.@threads for i in 1:100000
1+1
# Let's do some long computations here
end
using ProgressMeter
@showprogress 1 "Computing..." for i in 1:100000
1+1
# Let's do some long computations here
end
But none of the following works:
@showprogress 1 "Computing..." Threads.@threads for i in 1:100000
1+1
# Let's do some long computations here
end
using ProgressMeter
Threads.@threads @showprogress 1 "Computing..." for i in 1:100000
1+1
# Let's do some long computations here
end
So is it possible in Julia to have parallelism in a for loop as well as a Progress bar?