On Wed, May 21, 2014 at 10:17 AM, Josef Leydold <josef.leyd...@wu.ac.at>wrote:

> I ran into an issue with the parallel package in R-3.1.0.
>

I have been experiencing a very similar issue within the RAppArmor package.
Here is a smaller example:

library(parallel)
for (n in 1:5) {
  p <- mcparallel(sqrt(n))
  #Sys.sleep(0.01)
  res <- mccollect(p, wait=FALSE, timeout=1000)
  mccollect(p)
  if (is.null(res)) cat(n,"  NULL!\n")
}

If we run this, mccollect returns a lot of NULL values. However, after
uncommenting the sys.sleep, the problem disappears. Seems like some sort of
race condition.

        [[alternative HTML version deleted]]

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to