From simon.urbanek at r-project.org  Mon Oct 21 02:24:22 2013
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Sun, 20 Oct 2013 20:24:22 -0400
Subject: [Rd] Parallel R expression evaluations
In-Reply-To: <1382161049530-4678587.post@n4.nabble.com>
References: <1381931846577-4678352.post@n4.nabble.com>
	<77E2443B-BF01-42F8-B3AE-6AAF5CA9B391@r-project.org>
	<1382161049530-4678587.post@n4.nabble.com>
Message-ID: <70F220AA-E852-43F5-B3CA-302B72AF2C89@r-project.org>

Jai,

On Oct 19, 2013, at 1:37 AM, JaiReddy wrote:

> Thanks Simon.
> 
> May I know how R works if two expressions come at the same time for
> evaluation. When I debug my case I found that issue was found with indexed
> values of protected items. 
> 
> As R is single threaded engine, I just want to know how does R behave when
> 2nd expression comes for parsing and evaluation even before 1st expression
> evaluation does complete?
> 

As I said, no API calls may be performed in parallel, that includes parsing and evaluation. Typically, R is run in a sequential loop: read, parse, eval, print so anything that is not processed is blocked until the loop is back to reading. However, given that R can be called from arbitrary front-ends, it's really up to the front-end to decide what to do - as long as it serializes the calls appropriately.

Cheers,
Simon


> 
> Thanks
> Jai
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Parallel-R-expression-evaluations-tp4678352p4678587.html
> Sent from the R devel mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
> 



[Rd] Parallel R expression evaluations
Simon Urbanek