From pavel at stat.washington.edu  Tue Feb 27 03:39:19 2007
From: pavel at stat.washington.edu (Pavel N. Krivitsky)
Date: Mon, 26 Feb 2007 18:39:19 -0800
Subject: [Rd] Checking for user interrupt in a .C() call without without
 triggering a non-local exit.
Message-ID: <45E399D7.4080501@stat.washington.edu>

Hi,

An R package on which I am working makes a series of very
computationally-intensive and complex .C() calls, that I would like to
make interruptible. However, calling R_CheckUserInterrupt() causes a
non-local exit, so the memory allocated by malloc() is never freed. The
way the code is structured, it might not be practical to replace all the
malloc() calls with R_alloc() calls.

The question is, can I somehow detect a user interrupt and handle it
gracefully in my own code? A similar question was posed a few months ago
( http://tolstoy.newcastle.edu.au/R/devel/06/08/6415.html ), but didn't
get any response. Has anything changed since?

              Thanks,
              Pavel Krivitsky



[Rd] Checking for user interrupt in a .C() call without without triggering a non-local exit.
Pavel N. Krivitsky