search for: r_api_mutex

Displaying 4 results from an estimated 4 matches for "r_api_mutex".

2019 May 19
4
most robust way to call R API functions from a secondary thread
...gt; 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 R_NilValue; } // a wrapper arround Rf_onintr() which can be passed to R_UnwindProtect(): SEXP my_onintr(void *da...
2019 May 20
1
most robust way to call R API functions from a secondary thread
...>> 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 R_NilValue; >> } >> // a wrapper arround Rf_onintr() which can be...
2019 May 20
0
[External] most robust way to call R API functions from a secondary thread
...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 R_NilValue; > } > > // a wrapper arround Rf_onintr() which can be passed to R_Unwi...
2019 May 20
0
most robust way to call R API functions from a secondary thread
...nt 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 R_NilValue; > } > > // a wrapper arround Rf_onintr() which can be passed to...