Skip to content
Prev 24898 / 63424 Next

sending signals to embedded R

On Fri, 4 May 2007, Deepayan Sarkar wrote:

            
The tricky bit here is figuring out who does the sending.  It you have
a separate thread/process for the GUI and R then that is fine (though
may raise other issues).  If it is a single thread then you need your
event processing to get an occasional look in to recognise the user
action that triggers an interrupt. The Windows version handles this by
having R_CheckUserInterrupt() do a limited amount of event processing
(you need to be careful in GUI events have R actions associated with
them).  I believe the Mac version is similar though it has been a
while since I looked at that. I don't believe the unix version of
R_CheckUserInterrupt() does not provide hooks for installing such
checking (we have talked about this off an on but I don't believe
anything happened -- could be wrong there though).

If Qt allows this one option may be to have events on your nterrupt
widget managed by a small thread that does nothing other than send a
signal to the main thread if the widget is clicked.

Best,

luke