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