On 5/1/19 12:25 AM, Gergely Daróczi wrote:
Dear All,

I'm running into issues with calling mccollect on a list containing NULL
using R 3.6 (this used to work in 3.5.3):

jobs <- lapply(
     list(NULL, 'foobar'),
     function(x) mcparallel(identity(x)))
mccollect(jobs, wait = FALSE, timeout = 0)
#> Error in names(res) <- pnames[match(s, pids)] :
#>   'names' attribute [2] must be the same length as the vector [1]

Note, setting a "name" for the jobs does not help, but the above works with
"wait=TRUE", and also if I change the order of NULL and "foobar", although
in that case, the second value (NULL) is ommitted.  It also works with
mclapply fine.

Any ideas/suggestion on how to get mccollect work with the above example?.

NULL is not a valid job identification. Perhaps mccollect() could give a clearer error message, but I don't see, given its documentation, what else than throwing an error it should do. What is the problem you were trying to solve?

Best
Tomas


Thanks,
Gergely

        [[alternative HTML version deleted]]

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

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

Reply via email to