Skip to content

Commit 2f32d32

Browse files
CLEANUP: Drop argument 'collect = TRUE' (default) from signalEarly(), because this function is always called with the default arguments
1 parent e3df9d4 commit 2f32d32

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: future
2-
Version: 1.68.0-9025
2+
Version: 1.68.0-9026
33
Title: Unified Parallel and Distributed Processing in R for Everyone
44
Depends:
55
R (>= 3.2.0)

R/utils-signalEarly.R

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
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
#'
@@ -13,19 +10,16 @@
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

Comments
 (0)