Displaying 14 results from an estimated 14 matches for "r_interrupts_pend".
2019 May 19
4
most robust way to call R API functions from a secondary thread
...s Kersting
#include <Rinternals.h>
#include <pthread.h>
#include <signal.h>
#include <stdint.h>
extern uintptr_t R_CStackLimit;
extern int R_PPStackTop;
extern int R_PPStackSize;
#include <R_ext/libextern.h>
LibExtern Rboolean R_interrupts_suspended;
LibExtern int R_interrupts_pending;
extern void Rf_onintr(void);
// mutex for exclusive access to the R API:
static pthread_mutex_t r_api_mutex = PTHREAD_MUTEX_INITIALIZER;
// a wrapper arround R_CheckUserInterrupt() which can be passed to R_UnwindProtect():
SEXP check_interrupt(void *data) {
R_CheckUserInterrupt();
return...
2019 May 20
1
most robust way to call R API functions from a secondary thread
...>> #include <signal.h>
>> #include <stdint.h>
>> extern uintptr_t R_CStackLimit;
>> extern int R_PPStackTop;
>> extern int R_PPStackSize;
>> #include <R_ext/libextern.h>
>> LibExtern Rboolean R_interrupts_suspended;
>> LibExtern int R_interrupts_pending;
>> extern void Rf_onintr(void);
>> // mutex for exclusive access to the R API:
>> static pthread_mutex_t r_api_mutex = PTHREAD_MUTEX_INITIALIZER;
>> // a wrapper arround R_CheckUserInterrupt() which can be passed to R_UnwindProtect():
>> SEXP check_interrupt(void *...
2019 May 20
0
[External] most robust way to call R API functions from a secondary thread
...lude <pthread.h>
> #include <signal.h>
> #include <stdint.h>
>
> extern uintptr_t R_CStackLimit;
> extern int R_PPStackTop;
> extern int R_PPStackSize;
>
> #include <R_ext/libextern.h>
> LibExtern Rboolean R_interrupts_suspended;
> LibExtern int R_interrupts_pending;
> extern void Rf_onintr(void);
>
> // mutex for exclusive access to the R API:
> static pthread_mutex_t r_api_mutex = PTHREAD_MUTEX_INITIALIZER;
>
> // a wrapper arround R_CheckUserInterrupt() which can be passed to R_UnwindProtect():
> SEXP check_interrupt(void *data) {
&g...
2019 May 20
0
most robust way to call R API functions from a secondary thread
...de <pthread.h>
> #include <signal.h>
> #include <stdint.h>
>
> extern uintptr_t R_CStackLimit;
> extern int R_PPStackTop;
> extern int R_PPStackSize;
>
> #include <R_ext/libextern.h>
> LibExtern Rboolean R_interrupts_suspended;
> LibExtern int R_interrupts_pending;
> extern void Rf_onintr(void);
>
> // mutex for exclusive access to the R API:
> static pthread_mutex_t r_api_mutex = PTHREAD_MUTEX_INITIALIZER;
>
> // a wrapper arround R_CheckUserInterrupt() which can be passed to R_UnwindProtect():
> SEXP check_interrupt(void *data) {...
2012 May 22
1
Capturing signals from within external libs
I have a continuous loop running in an external library that I am calling
from C (R API). This loop is processing events in real time with the
possibility of significant lag between events.
When processing an event, I can make use of R_CheckUserInterrupt, but
while the external library code is waiting on a new event, I don't have an
opportunity to call this - my entry points are only on
2016 Oct 26
3
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
...code differ based on
preprocessing directive HAVE_AQUA, which could explain why Spencer
observes a different behavior than Peter and Berend (all on macOS).
Whenever the R_CheckUserInterrupt() function is called it in turn
always calls R_ProcessEvents(). At the end, there is a code snippet -
if (R_interrupts_pending) onintr(); - which is Windows specific and
could be another important difference between Windows and Unix. This
function is defined in:
* src/main/errors.c
(https://github.com/wch/r-source/blob/trunk/src/main/errors.c#L114-L134)
The do_setTimeLimit() function controls global variables cpuLim...
2016 Oct 27
2
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
...QUA, which could explain why Spencer
>> observes a different behavior than Peter and Berend (all on macOS).
>>
>>
>> Whenever the R_CheckUserInterrupt() function is called it in turn
>> always calls R_ProcessEvents(). At the end, there is a code snippet -
>> if (R_interrupts_pending) onintr(); - which is Windows specific and
>> could be another important difference between Windows and Unix. This
>> function is defined in:
>>
>> * src/main/errors.c
>> (https://github.com/wch/r-source/blob/trunk/src/main/errors.c#L114-L134)
>>
>>
>...
2007 May 04
1
sending signals to embedded R
Hi,
one thing I haven't been able to figure out from R-exts is how to
interrupt a calculation running inside an embedded R. C code inside R
calls R_CheckUserInterrupt() intermittently to check for interrupts,
but how does my GUI tell R that the user wants it interrupted?
-Deepayan
2009 Jan 16
1
interrupting R from a GUI
list(...),
I am looking for a way to interrupt R from a callback: specifically,
to interrupt plotting (typically on a cairoDevice, but would be good
if it worked with other devices too). Of course, one can interrupt R
nicely from the console with Ctrl-C (or Esc in Rgui), but I need to do
it from a GUI. Callbacks run in a new thread, so obviously stop() etc
will not work. I tried to look into how
2016 Oct 26
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
...ssing directive HAVE_AQUA, which could explain why Spencer
> observes a different behavior than Peter and Berend (all on macOS).
>
>
> Whenever the R_CheckUserInterrupt() function is called it in turn
> always calls R_ProcessEvents(). At the end, there is a code snippet -
> if (R_interrupts_pending) onintr(); - which is Windows specific and
> could be another important difference between Windows and Unix. This
> function is defined in:
>
> * src/main/errors.c
> (https://github.com/wch/r-source/blob/trunk/src/main/errors.c#L114-L134)
>
>
> The do_setTimeLimit() f...
2016 Oct 31
1
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
...;> observes a different behavior than Peter and Berend (all on macOS).
>>>>
>>>>
>>>> Whenever the R_CheckUserInterrupt() function is called it in turn
>>>> always calls R_ProcessEvents(). At the end, there is a code snippet -
>>>> if (R_interrupts_pending) onintr(); - which is Windows specific and
>>>> could be another important difference between Windows and Unix. This
>>>> function is defined in:
>>>>
>>>> * src/main/errors.c
>>>> (https://github.com/wch/r-source/blob/trunk/src/main/e...
2016 Oct 31
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
...why Spencer
>>> observes a different behavior than Peter and Berend (all on macOS).
>>>
>>>
>>> Whenever the R_CheckUserInterrupt() function is called it in turn
>>> always calls R_ProcessEvents(). At the end, there is a code snippet -
>>> if (R_interrupts_pending) onintr(); - which is Windows specific and
>>> could be another important difference between Windows and Unix. This
>>> function is defined in:
>>>
>>> * src/main/errors.c
>>> (https://github.com/wch/r-source/blob/trunk/src/main/errors.c#L114-L134)
&...
2004 Mar 13
0
64bit build on IBM
...0711-317 ERROR: Undefined symbol: .Rf_mkString
ld: 0711-317 ERROR: Undefined symbol: .Rf_gsetVar
ld: 0711-317 ERROR: Undefined symbol: .GEcreateDevDesc
ld: 0711-317 ERROR: Undefined symbol: .Rf_addDevice
ld: 0711-317 ERROR: Undefined symbol: .GEinitDisplayList
ld: 0711-317 ERROR: Undefined symbol: R_interrupts_pending
ld: 0711-317 ERROR: Undefined symbol: .Rf_onintr
ld: 0711-317 ERROR: Undefined symbol: .R_alloc
ld: 0711-317 ERROR: Undefined symbol: .Rf_findVar
ld: 0711-317 ERROR: Undefined symbol: .Rf_elt
ld: 0711-317 ERROR: Undefined symbol: .Rf_GetDevice
ld: 0711-317 ERROR: Undefined symbol: R_InputHandler...
2016 Oct 26
5
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
setTimeLimit(elapsed=1) causes a timeout error whenever a call takes
more than one second. For instance, this is how it works on Windows
(R 3.3.1):
> setTimeLimit(elapsed=1)
> Sys.sleep(10); message("done")
Error in Sys.sleep(10) : reached elapsed time limit
Also, the error propagates immediately and causes an interrupt after ~1 second;
> system.time({ Sys.sleep(10);