[R] Thread-safeness of unif_rand()?

Sebastian Bauer Sebastian.Bauer at charite.de
Fri Feb 12 15:30:04 CET 2010


Hello,

I'm currently using the unif_rand() function of R to get a random number 
from the uniform distribution in the C-part of a R package. The 
unif_rand() is heavily used. Now I would like to spawn several threads 
within the package in which the function is also heavily used. Is it 
safe and efficient to call this function from multiple threads?

Bye,
Sebastian



More information about the R-help mailing list