Skip to content

Does resolve(..., result=TRUE) work? #680

Answered by HenrikBengtsson
bwlewis asked this question in Q&A
Discussion options

You must be logged in to vote

Hi. Sorry, this one slipped. resolve(x) always returns x. With result = FALSE, resolve() queries the parallel worker for whether the future has been resolved or not, and it does so as quick as possible with minimal extra overhead. However, sometimes it can be more performant to collect the results back from the parallel worker at the same time. For instance, when there are multiple concurrent futures, we can collect the results while waiting for other futures to resolve, which is faster than waiting for all futures to resolve and then collect the results. That is what result = TRUE achieves. I've updated help("resolve") to clarify this.

Also, value(ans) in your example, where ans is a lis…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by HenrikBengtsson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants