Giter Club home page Giter Club logo

Comments (2)

HenrikBengtsson avatar HenrikBengtsson commented on May 18, 2024

Test with multicore futures as they behave right now if there is an interrupt:

> library("future")

## Start a multicore process
> f <- multicore({ print(1); Sys.sleep(30); print(2); TRUE })
> [1] 1

## Let's find the PID (non-official; don't use in code)
> f$job$pid
[1] 47841

## Let's send an INT(errupt) signal
> system2("kill", c("-INT", f$job$pid))

## Check the value of the multicore future
> value(f)
[1] "fatal error in wrapper code"
attr(,"class")
[1] "try-error"
> traceback()
No traceback available

from future.

HenrikBengtsson avatar HenrikBengtsson commented on May 18, 2024

This is now detected and an error is generated;

> library("future")
> f <- multicore({ print(1); Sys.sleep(30); print(2); TRUE })
> system2("kill", c("-INT", f$job$pid))
[1] 1
> value(f)
Error in value.MulticoreFuture(f) :
Detected an error ('fatal error in wrapper code') by the 'parallel' package while trying
to retrieve the value of a MulticoreFuture ('{; print(1); Sys.sleep(30); print(2); TRUE; }').
This could be because the forked R process that evalutes the future was terminated
before it was completed.
>

from future.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.