search for: fun_running_in_main_thread

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

2019 May 19
4
most robust way to call R API functions from a secondary thread
...ate which, combines the proposed solutions (and skips all non-illustrative checks of return values). Additionally, R_CheckUserInterrupt() is used in combination with R_UnwindProtect() to regularly check for interrupts from the main thread, while still being able to cleanly cancel the threads before fun_running_in_main_thread() is left via a longjmp. This is e.g. required if the secondary threads use memory which was allocated in fun_running_in_main_thread() using e.g. R_alloc(). Best regards, Andreas Kersting #include <Rinternals.h> #include <pthread.h> #include <signal.h> #include <stdint.h&gt...
2019 May 20
1
most robust way to call R API functions from a secondary thread
...ate which, combines the proposed solutions (and skips all non-illustrative checks of return values). Additionally, R_CheckUserInterrupt() is used in combination with R_UnwindProtect() to regularly check for interrupts from the main thread, while still being able to cleanly cancel the threads before fun_running_in_main_thread() is left via a longjmp. This is e.g. required if the secondary threads use memory which was allocated in fun_running_in_main_thread() using e.g. R_alloc(). >> Best regards, >> Andreas Kersting >> #include <Rinternals.h> >> #include <pthread.h> >> #include...
2019 May 20
0
[External] most robust way to call R API functions from a secondary thread
...ate which, combines the proposed solutions (and skips all non-illustrative checks of return values). Additionally, R_CheckUserInterrupt() is used in combination with R_UnwindProtect() to regularly check for interrupts from the main thread, while still being able to cleanly cancel the threads before fun_running_in_main_thread() is left via a longjmp. This is e.g. required if the secondary threads use memory which was allocated in fun_running_in_main_thread() using e.g. R_alloc(). > > Best regards, > Andreas Kersting > > > > #include <Rinternals.h> > #include <pthread.h> > #include...
2019 May 20
0
most robust way to call R API functions from a secondary thread
...ate which, combines the proposed solutions (and skips all non-illustrative checks of return values). Additionally, R_CheckUserInterrupt() is used in combination with R_UnwindProtect() to regularly check for interrupts from the main thread, while still being able to cleanly cancel the threads before fun_running_in_main_thread() is left via a longjmp. This is e.g. required if the secondary threads use memory which was allocated in fun_running_in_main_thread() using e.g. R_alloc(). > > Best regards, > Andreas Kersting > > > > #include <Rinternals.h> > #include <pthread.h> > #incl...