Skip to content

Commit 14afac5

Browse files
authored
Remove ineffective promise cache from as.promise.mirai_map (#641)
1 parent 788d936 commit 14afac5

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#### Updates
44

5+
* Removes an ineffective promise cache from the `as.promise()` method for 'mirai_map' objects.
56
* Fixes `mirai_map()` collection option `.flat` ignoring an 'errorValue' in the first element (#639).
67
* Fixes `daemon()` returning exit code 1 (idletime) instead of 2 (walltime) when `walltime` elapses while idle (#637).
78
* Fixes `race_mirai()` not waiting for resolution on compute profiles set with `url` and `dispatcher = FALSE` (#635).

R/promises.R

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,7 @@ handle_fulfilled <- function(value, .visible) {
8989
#'
9090
#' @exportS3Method promises::as.promise
9191
#'
92-
as.promise.mirai_map <- function(x) {
93-
promise <- attr(x, "promise")
94-
95-
if (is.null(promise)) {
96-
attr(x, "promise") <- promises::promise_all(.list = x) -> promise
97-
}
98-
99-
promise
100-
}
92+
as.promise.mirai_map <- function(x) promises::promise_all(.list = x)
10193

10294
#' @exportS3Method promises::is.promising
10395
#'

0 commit comments

Comments
 (0)