22# '
33# ' @param future A [Future] object.
44# '
5- # ' @param collect (logical) If TRUE, the future results are collected if
6- # ' the future is resolved and flagged for early signaling.
7- # '
85# ' @param .signalEarly (logical) If TRUE, and the future results have been
96# ' collected, any non-signaled conditions are signaled.
107# '
1310# ' @return The `future` object.
1411# '
1512# ' @details
16- # ' This function does nothing ("no-op"), if the future:
17- # ' * is _not_ flagged for early signaling,
18- # ' * is lazy, or
19- # ' * is not resolved and `collect = FALSE`.
20- # ' Otherwise, the future results are collected, which blocks if the future is
21- # ' not resolved. After the results are collected, nothing is signaled, if:
13+ # ' This function returns immediately ("no-op"), if the future (i) is _not_
14+ # ' flagged for early signaling, or (ii) not resolved.
15+ # ' Otherwise, the future results are collected. Then, nothing is signaled, if:
2216# ' * no conditions were captured, or
2317# ' * `.signalEarly = FALSE`.
2418# ' Otherwise, captured conditions are signaled, unless they have been
2519# ' signaled previously.
2620# '
2721# ' @noRd
28- signalEarly <- function (future , collect = TRUE , .signalEarly = TRUE , ... ) {
22+ signalEarly <- function (future , .signalEarly = TRUE , ... ) {
2923 # # Don't signal early?
3024 if (! isTRUE(future [[" earlySignal" ]])) return (future )
3125
@@ -36,9 +30,9 @@ signalEarly <- function(future, collect = TRUE, .signalEarly = TRUE, ...) {
3630 if (debug ) mdebug_push(" signalEarly() ..." )
3731
3832 # # Nothing to do?
39- if (! collect && ! resolved(future , .signalEarly = FALSE )) {
33+ if (! resolved(future , .signalEarly = FALSE )) {
4034 if (debug ) {
41- mdebug(" Future not resolved and collect = FALSE . Skipping" )
35+ mdebug(" Future is not resolved. Skipping" )
4236 mdebug_pop()
4337 }
4438 return (future )
0 commit comments