From chuck at sharpsteen.net  Mon Jan 23 21:00:07 2012
From: chuck at sharpsteen.net (Sharpie)
Date: Mon, 23 Jan 2012 12:00:07 -0800 (PST)
Subject: [Rd] Ignore user interrupts
In-Reply-To: <1327337214864-4321252.post@n4.nabble.com>
References: <1327337214864-4321252.post@n4.nabble.com>
Message-ID: <1327348807154-4321817.post@n4.nabble.com>


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.



[Rd] Ignore user interrupts
Sharpie