Re: [Rd] Ignore user interrupts

From: Sharpie <chuck_at_sharpsteen.net>
Date: Mon, 23 Jan 2012 12:00:07 -0800 (PST)

Sharpie wrote
>
> If not, would it work to move the function call into a C function that
> uses `eval` inside a block protected by BEGIN_SUSPEND_INTERRUPTS?
>

Just to clarify, if there is no functionality at the R level for evaluating an expression without interrupts, would it be possible to create it by defining a function:

evalWithoutInterrupts <- function(expr, envir = parent.frame()) {
  .Call(do_evalWithoutInterrupts, expr, envir) }

With a C-level implemention:

SEXPR do_evalWithoutInterrupts(SEXP expr, SEXP envir) {
  SEXP result;

  BEGIN_SUSPEND_INTERRUPTS{
    result = eval(expr, envir);
  }END_SUSPEND_INTERRUPTS;   return result;
}

Would that be a correct way to tackle the problem?

-Charlie



Charlie Sharpsteen
Undergraduate-- Environmental Resources Engineering Humboldt State University
--
View this message in context: http://r.789695.n4.nabble.com/Ignore-user-interrupts-tp4321252p4321817.html
Sent from the R devel mailing list archive at Nabble.com.

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Mon 23 Jan 2012 - 20:03:03 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

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 26 Jan 2012 - 20:40:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive