Skip to content
Discussion options

You must be logged in to vote

Hi. Let me start by explaining the current behavior. I'll end with a solution.

For example, say I would like to print each process id when it is completed with something like:

future_apply(array(1:2), 1, function(i) {
    Sys.sleep(abs(i-2)*20)
    message(paste("Process",i,"completed !")) } )

Even if the process n°2 is completed before process n°1, the console do not print "Process 2 completed !" first.

This is by design. The future.apply package replicates the behavior of the corresponding apply functions in base R. This way the threshold from going, say, apply() to future_apply() is kept at a minimum. More over, the behavior of the future_nnn() functions are designed to behave exact…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by HenrikBengtsson
Comment options

You must be logged in to vote
0 replies
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