I have tested the solutions suggested by Simon and Thomas on a Linux
machine. These are my findings:
On Windows you can look at the variable UserBreak, available from
Rembedded.h. Outside of Windows, you can look at R_interrupts_pending,
available from R_ext/GraphicsDevice.h.
Hello,
I am writing an R interface for one of my C++ programs. The computations
in C++ are very time consuming (several hours), so the user needs to be
able to interrupt them. Currently, the only way I found to do so is
calling R_CheckUserInterrupt() frequently. Unfortunately, there are
Dear Simon,
thanks again for your explanations. Your previous e-mail clarified
several points for me.
Actually, it just came to me that there is a hack you could use. [...]
That actually looks quite nice. At least when compared to my currently
only alternative of not interrupting at all. I