Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Loops and missing else branches in async() functions should return promises to NULL #33

@lionel-

Description

@lionel-

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions