From simon.urbanek at r-project.org  Wed Mar 18 14:28:48 2009
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Wed, 18 Mar 2009 09:28:48 -0400
Subject: [Rd] R thread safe
In-Reply-To: <49C0F021.8000108@health.sdu.dk>
References: 1131389848.436fa39855a52@webmail.unibas.ch
	<49C0F021.8000108@health.sdu.dk>
Message-ID: <4BD0BA7D-242B-4D27-A346-745AB8AD088E@r-project.org>


On Mar 18, 2009, at 8:59 , Rune Schjellerup Philosof wrote:

> Duncan Temple Lang wrote (Mon Nov 7 22:35:22 CET 2005):
>> R is not yet thread safe.
>> We are working on it, and I hope to make some progress before
>> the end of the year.  (This one even!)
>>
>> D.
>
> How is this going along?
>
> For some things it would be simpler to use threads compared to
> processes, to avoid the added complexity of passing the results back  
> to
> a master process.
>
> With the emerging multicore processors it is essential that users can
> easily make use of them.
>
> A simple example of use:
>  data1 <- data2 <- matrix(0, r, c)
>  dataFiller <- function(i) {
>   tmp <- someCalculation(i)
>   data1[, i] <<- tmp$result1
>   data2[, i] <<- tmp$result2
>  }
>  runParallelInThreads(1:c, dataFiller)
>
> If this can be done almost as fast and simple with processes, for
> instance using the multicore package, then I think it needs to be  
> better
> documented.
>

Can you elaborate on the last sentence, please? Things cannot happen  
if you don't ask ...

Cheers,
Simon


> -- 
> Regards
> Rune Schjellerup Philosof
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



[Rd] R thread safe
Simon Urbanek