Skip to content

making stop() immediate #75

@rickhelmus

Description

@rickhelmus

Hello,

Consider the following simple example:

library(future.apply)
plan(cluster, workers = 4)

future_lapply(1:4, function(x)
{
    if (x == 2)
        stop("x==2")
    Sys.sleep(10)
})

Ideally in my scenario this would stop immediately with an error message, but instead it takes ten seconds and then the error is thrown. Is there a way to change this? I saw a somewhat related discussion on throwing custom conditions, which I guess could also work, but to me the above situation seemed like a fairly common use case to have.

Thanks,
Rick

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions