-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
showprogress
setting
#59
Comments
Brainstorming further, this could maybe be a Pkg extension: On loading ProgressMeter.jl we enable setting an option p = Progress(100);
tforeach(1:100) do i
sleep(rand())
next!(p)
end Of course, people could always do this themselves, especially if they have to load ProgressMeter manually anyways. |
We could open a PR with ProgressMeter.jl to fix their implementation of Currently, they detect just based on the AST if the mapping function is allowed: julia> @macroexpand @showprogress map(f, 1:10)
:(ProgressMeter.progress_map(f, 1:10, progress = ProgressMeter.Progress(ProgressMeter.ncalls(map, (f, 1:10))), mapfun = map))
julia> @macroexpand @showprogress tmap(f, 1:10)
ERROR: ArgumentError: Final argument to @showprogress must be a for loop, comprehension, map, reduce, or pmap; got tmap(f, 1:10)
Stacktrace: This really should instead be checked when the types are known, not during macroexpansion I think. |
Sounds like a good idea |
Has this PR been started? Would be happy to contribute. |
No i don't think so. Feel free to give it a shot! |
https://github.com/timholy/ProgressMeter.jl is essentially thread safe.
The text was updated successfully, but these errors were encountered: