[R] mkChar can be interrupted

Vadim Ogranovich vograno at evafunds.com
Tue Jun 15 01:34:06 CEST 2004

I am confused. Here is an excerpt from R-exts:

"As from R 1.8.0 no port of R can be interrupted whilst running long
computations in
compiled code,..."

Doesn't it imply that the primitive functions like allocVector, mkChar,
etc., which are likely to occur in any compiled code called via .Call,
are not supposed to handle interrupts in any way?


> From: Luke Tierney [mailto:luke at stat.uiowa.edu] 
> On Mon, 14 Jun 2004, Vadim Ogranovich wrote:
> > > From: Luke Tierney [mailto:luke at stat.uiowa.edu]
> > > 
> > > Not sure why you think this suggest mkChar can be interrupted.
> > > 
> > > by calls to this function.  I don't believe there are any 
> such safe 
> > > points in mkChar, but there are several potential ones 
> within your 
> > > example.
> > 
> > Apart from mkChar I am only calling SET_STRING_ELT. Is this 
> what you 
> > mean?
> You are printing, you have an assignment expression, all of 
> those contain points where an interrupt could be checked for.

These are not relevant since Ctrl-C is pressed when the code is inside
  for (i=0; i<n; ++i) {
    SET_STRING_ELT(resSexp, i, mkChar("foo"));

Just look at the way I deliver the signal.

More information about the R-help mailing list