MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / check_interrupt

Function check_interrupt

inst/examples/OpenMP/piWithInterrupts.cpp:64–66  ·  view source on GitHub ↗

* Call this method to check for user interrupts. * This is based on the results of a discussion on the * R-devel mailing list, suggested by Simon Urbanek. * @attention This method must not be called by any other * thread than the master thread. If called from within * an OpenMP parallel for loop, make sure to check * for omp_get_thread_num()==0 before calling this method! * @return True,

Source from the content-addressed store, hash-verified

62 * @return True, if a user interrupt has been detected.
63 */
64inline bool check_interrupt() {
65 return (R_ToplevelExec(check_interrupt_impl, NULL) == FALSE);
66}
67
68/**
69 * Compute pi using the Leibniz formula

Callers 1

PiLeibnizFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected