[Rcpp-devel] Rcpp & Multithreading
Jaiganesh Balasubramanian
jaiganesh.balasubramanian at gmail.com
Sat May 1 00:21:31 CEST 2010
Hi Dirk,
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'
> #endif
>
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
> the
> issue then you are out of luck, and R has to stay in one thread. You may
> be
> 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.
Thanks,
Jai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20100430/6ca4997b/attachment.htm>
More information about the Rcpp-devel
mailing list