Hello, these days, as the author of Futureverse, I recommend to use:
instead of:
One reason is that it value(fs) on a set of futures fs supports early stopping in case of errors and interrupts. For instance, if the user interrupts the processing, value(fs) will cancel all active futures, which results in value(fs) exiting much sooner. Same happens if one of the futures result in an error -- all other futures will be canceled and then the error is produced. This will not happen when using lapply(fs, value).
Here's one example where you could update your code accordingly:
|
samplers <- lapply(samplers, future::value) |
Hello, these days, as the author of Futureverse, I recommend to use:
instead of:
One reason is that it
value(fs)on a set of futuresfssupports early stopping in case of errors and interrupts. For instance, if the user interrupts the processing,value(fs)will cancel all active futures, which results invalue(fs)exiting much sooner. Same happens if one of the futures result in an error -- all other futures will be canceled and then the error is produced. This will not happen when usinglapply(fs, value).Here's one example where you could update your code accordingly:
greta/R/inference.R
Line 388 in ddc98fb