Displaying 6 results from an estimated 6 matches for "my_onintr".
2019 May 19
4
most robust way to call R API functions from a secondary thread
...utex_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 R_NilValue;
}
// a wrapper arround Rf_onintr() which can be passed to R_UnwindProtect():
SEXP my_onintr(void *data) {
Rf_onintr();
return R_NilValue;
}
// function called by R_UnwindProtect() to cleanup on interrupt
void cleanfun(void *data, Rboolean jump) {
if (jump) {
// terminate threads cleanly ...
}
}
void fun_calling_R_API(void *data) {
// call some R API function, e.g. mkCharCE...
2019 May 20
1
most robust way to call R API functions from a secondary thread
...wrapper arround R_CheckUserInterrupt() which can be passed to R_UnwindProtect():
>> SEXP check_interrupt(void *data) {
>> R_CheckUserInterrupt();
>> return R_NilValue;
>> }
>> // a wrapper arround Rf_onintr() which can be passed to R_UnwindProtect():
>> SEXP my_onintr(void *data) {
>> Rf_onintr();
>> return R_NilValue;
>> }
>> // function called by R_UnwindProtect() to cleanup on interrupt
>> void cleanfun(void *data, Rboolean jump) {
>> if (jump) {
>> // terminate threads cleanly ...
>> }
>> }
&g...
2019 May 20
0
[External] most robust way to call R API functions from a secondary thread
...LIZER;
>
> // a wrapper arround R_CheckUserInterrupt() which can be passed to R_UnwindProtect():
> SEXP check_interrupt(void *data) {
> R_CheckUserInterrupt();
> return R_NilValue;
> }
>
> // a wrapper arround Rf_onintr() which can be passed to R_UnwindProtect():
> SEXP my_onintr(void *data) {
> Rf_onintr();
> return R_NilValue;
> }
>
> // function called by R_UnwindProtect() to cleanup on interrupt
> void cleanfun(void *data, Rboolean jump) {
> if (jump) {
> // terminate threads cleanly ...
> }
> }
>
> void fun_calling_R_API(void...
2003 Jul 16
2
Fatal error in SJava.
Dear r-helpers,
I have been trying to invoke R from Java in a Windows 2000 computer
(unfortunately). All my environment variables seem to be properly set,
everything seems to be in order, but I obtaining a
Fatal error: unable to open the base package
error window.
Also, the output of the invoker is
Loading RInterpreter library
R_HOME: R_HOME=C:/Programas/R
RVersion: R_VERSION=1.6.1
whereas
2019 May 20
0
most robust way to call R API functions from a secondary thread
...>
> // a wrapper arround R_CheckUserInterrupt() which can be passed to R_UnwindProtect():
> SEXP check_interrupt(void *data) {
> R_CheckUserInterrupt();
> return R_NilValue;
> }
>
> // a wrapper arround Rf_onintr() which can be passed to R_UnwindProtect():
> SEXP my_onintr(void *data) {
> Rf_onintr();
> return R_NilValue;
> }
>
> // function called by R_UnwindProtect() to cleanup on interrupt
> void cleanfun(void *data, Rboolean jump) {
> if (jump) {
> // terminate threads cleanly ...
> }
> }
>
> void fun_calling...
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