Apparently I forgot to support withprogress in ThreadsX.jl. So you’d need to invoke Transducers.jl API directly ATM.
MWE:
julia> using Logging, TerminalLoggers
julia> global_logger(TerminalLogger());
julia> using Transducers
julia> function fun(x)
t0 = time_ns()
while time_ns() - t0 < 1e8
end
sin(x)
end
fun (generic function with 1 method)
julia> x = rand(300);
julia> y = tcollect(withprogress(fun(a) for a in x); basesize = 1)
That said, the responsiveness of withprogress in threaded execution is not very nice. Depending on the actual run-time of fun, it may work fine, though.