-
Notifications
You must be signed in to change notification settings - Fork 85
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
future does not invoke winProgressBar #180
Comments
This is expected and not really related to futures per se but rather to limitations of the different parallel backends we're using. When on Windows, So why does it work on Unix/macOS? Because there the What can be done? This is tricky and with the risk of overwhelming you with details, this is related to:
Hope this clarifies. |
It is difficult to find an anwser to this question and the doc as well as your answer are pretty clear this is not possible. However I did it relatively easily. Did I miss something ? plan(multiprocess)
n = 10
f <- list()
for (i in 1:n)
{
f[[i]] <- future({ Sys.sleep(runif(1, 0.5, 1)) })
cat(sprintf("\rProgress: %g%%", i/n*100), file = stderr())
} |
Note that you're running the progress bar in the main R session, which works just fine. What OP (and many others) is after is to update the progress bar from within a future. Since such futures can run anywhere, not just (in forked process) on your local machine, it is a complex problem to figure out how to communicate such information from future workers back to the main R session. |
Ok I got it. Indeed this is much complex question. But for my task this solution works fine :-) |
I have a piece that just shows a progress bar in Windows. However when I try to use future to run it in the background it doesn't show. Perhaps it's not a bug but would be worthwhile to document.
BTW thank you again for such an awesome package I will try to help with documentation and finding bugs whenever I can.
The text was updated successfully, but these errors were encountered: