[Rcpp-devel] Rcpp & Multithreading
jaiganesh.balasubramanian at gmail.com
Sat May 1 00:21:31 CEST 2010
Thanks for your reply.
Well, we already do that when RInside sets itself up:
> #ifdef CSTACK_DEFNS
> R_CStackLimit = (uintptr_t)-1; // Don't do any stack checking, see
> R Exts, '8.1.5 Threading issues'
Yes, i noticed this, and added the MACRO definition in my code as
#define CSTACK_DEFNS 1
What I would do now is to create a sample program with two threads, then
> initialize R in one and the query from the other. If that already tickles
> issue then you are out of luck, and R has to stay in one thread. You may
> able to use inter-thread communication to 'request' data from the
> R-containing thread by carefully brokering the requests.
This is exactly what my program is doing right now, and it does not work.
If it works, it would be awesome, because, we could then perform multi-core
programming with Rcpp/RInside in a seamless fashion with any native
threading mechanism like Pthreads.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rcpp-devel