Re: [Rcpp-devel] Rcpp-devel Digest, Vol 57, Issue 18

2014-07-17 Thread Dirk Eddelbuettel
On 17 July 2014 at 16:50, JJ Allaire wrote: | It very well may be thread-safe, but my thinking is that it could be dangerous | to use a class where some methods are thread-safe and some are not (and there | isn't necessarily documentation or a formal contract on what's safe and what's | not). Your

Re: [Rcpp-devel] Rcpp-devel Digest, Vol 57, Issue 18

2014-07-17 Thread JJ Allaire
It very well may be thread-safe, but my thinking is that it could be dangerous to use a class where some methods are thread-safe and some are not (and there isn't necessarily documentation or a formal contract on what's safe and what's not). Your current use is likely fine, I'm just being cautious.

Re: [Rcpp-devel] Rcpp-devel Digest, Vol 57, Issue 18

2014-07-17 Thread Alessandro Mammana
Sorry, I read this post just by chance, did I understand correctly, the class Rcpp::Matrix are not thread safe? Is there any problem in writing code such as: mat(i,j) = something in a multithreaded environment (such as inside a "#pragma omp parallel for" loop)? My scripts are full of such loops.