[Rcpp-devel] checking for user interrupts when wrapping external library

Simon Barthelmé simon.barthelme at gipsa-lab.fr
Fri Feb 19 15:48:45 CET 2016


Dear list,

I was wondering what solutions there were with for letting the user 
interrupt (lengthy) computations done in external libraries. When 
writing one's own function there's checkUserInterrupt() but what if 
everything happens in an external library that can't be directly modified?
I'm guessing one option is to spin off a separate thread for the 
computation while monitoring for interrupts on the main thread. Are 
there any examples of code doing this? Is there a better way? I'd love 
to hear your thoughts.

Thanks

Simon


More information about the Rcpp-devel mailing list