coro
coro copied to clipboard
Loops and missing else branches in `async()` functions should return promises to `NULL`
They currently return the exhaustion sentinel which is not thenable:
fn <- async(function() while (FALSE) NULL)
fn()
#> exhausted
promises::then(fn(), ~ NULL)
#> Error in as.promise.default(promise) :
#> Don't know how to convert object of class name into a promise
For technical reasons this is only an issue in async functions that don't use await()
. Low priority.