search for: __oldsusp__

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

2019 May 19
4
most robust way to call R API functions from a secondary thread
...CT(R_MakeUnwindCont()); /* block all signals: * * do this before the threads are created such that they inherit the mask */ sigset_t block_set, prev_mask; sigfillset(&block_set); pthread_sigmask(SIG_SETMASK, &block_set, &prev_mask); // suspend interrupts: Rboolean __oldsusp__ = R_interrupts_suspended; R_interrupts_suspended = TRUE; // create threads running threaded_fun() ... for(;;) { // timed blocking check if threads are done ... // unblock signals, check for interrupts and run cleanfun if there is one: pthread_mutex_lock(&r_api_mutex); p...
2019 May 20
1
most robust way to call R API functions from a secondary thread
...* do this before the threads are created such that they inherit the mask >> */ >> sigset_t block_set, prev_mask; >> sigfillset(&block_set); >> pthread_sigmask(SIG_SETMASK, &block_set, &prev_mask); >> // suspend interrupts: >> Rboolean __oldsusp__ = R_interrupts_suspended; >> R_interrupts_suspended = TRUE; >> // create threads running threaded_fun() ... >> for(;;) { >> // timed blocking check if threads are done ... >> // unblock signals, check for interrupts and run cleanfun if there is one: >&...
2019 May 20
0
[External] most robust way to call R API functions from a secondary thread
...all signals: > * > * do this before the threads are created such that they inherit the mask > */ > sigset_t block_set, prev_mask; > sigfillset(&block_set); > pthread_sigmask(SIG_SETMASK, &block_set, &prev_mask); > > // suspend interrupts: > Rboolean __oldsusp__ = R_interrupts_suspended; > R_interrupts_suspended = TRUE; > > // create threads running threaded_fun() ... > > for(;;) { > // timed blocking check if threads are done ... > > // unblock signals, check for interrupts and run cleanfun if there is one: > pthread...
2019 May 20
0
most robust way to call R API functions from a secondary thread
...* > * do this before the threads are created such that they inherit the mask > */ > sigset_t block_set, prev_mask; > sigfillset(&block_set); > pthread_sigmask(SIG_SETMASK, &block_set, &prev_mask); > > // suspend interrupts: > Rboolean __oldsusp__ = R_interrupts_suspended; > R_interrupts_suspended = TRUE; > > // create threads running threaded_fun() ... > > for(;;) { > // timed blocking check if threads are done ... > > // unblock signals, check for interrupts and run cleanfun if there is one: &g...