search for: cleanfun

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

Did you mean: clean_up
2019 May 19
4
most robust way to call R API functions from a secondary thread
...): 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() ... } void *threaded_fun(void *td) { // ... pthread_mutex_lock(&r_api_mutex); // avoid false stack overflow error:...
2019 May 20
1
most robust way to call R API functions from a secondary thread
...rn 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() ... >> } >> void *threaded_fun(void *td) { >> // ... &g...
2019 May 20
0
[External] most robust way to call R API functions from a secondary thread
...rInterrupt(); > 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() ... > } > > void *threaded_fun(void *td) { > > // ... > > pthread_mutex_loc...
2019 May 20
0
most robust way to call R API functions from a secondary thread
...pt(); > 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() ... > } > > void *threaded_fun(void *td) { > > // ... > > p...