Re: [Rd] Interrupting C++ code execution

From: Andrew Runnalls <>
Date: Thu, 28 Apr 2011 13:55:44 +0100


On 25/04/11 10:22, wrote:
> 1. Calling R_CheckUserInterrupt() interrupts immediately, so I have no
> possibility to exit my code gracefully. In particular, I suppose that
> objects created on the heap (e.g., STL containers) are not destructed
> properly.

Sorry not to have seen this thread sooner.

You may like to give CXXR a try
( In CXXR the R interpreter is written in C++, and a user interrupt is handled by throwing a C++ exception, so the stack is unwound in an orderly fashion, destructors are invoked, etc.

However, it's fair to say that in using CXXR with a multi-threaded program you'll be on the bleeding edge...

Andrew mailing list Received on Thu 28 Apr 2011 - 12:58:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 28 Apr 2011 - 14:30:53 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive