On Monday 25 April 2011, Simon Urbanek wrote: > Actually, it just came to me that there is a hack you could use. The > problem with it is that it will eat all errors, even if they were not > yours (e.g. those resulting from events triggered the event loop), so I > would not recommend it for general use.
Here's another option which is probably not recommendable for general use, since it is not part of the documented API: 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. R_ext/GraphicsDevice.h also has R_interrupts_suspended, which you may or may not want to take into account, depending on your use-case. BTW, being able to check for a pending interrupt or to schedule an interrupt from a separate thread is something that can come in handy in GUI development as well, and personally, I would appreciate, if there was some slightly more official support for this. Regards Thomas
signature.asc
Description: This is a digitally signed message part.
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel