UrbanAnalyst / dodgr

Distances on Directed Graphs in R
https://urbananalyst.github.io/dodgr/
127 stars 16 forks source link

do not use Rcpp in any parallel operations #131

Closed mpadge closed 4 years ago

mpadge commented 4 years ago

From the Rcpp site:

The code that you write within parallel workers should not call the R or Rcpp API in any fashion. This is because R is single-threaded and concurrent interaction with it’s data structures can cause crashes and other undefined behavior.

The next section then describes the straightforward solution of wrapping them all as RVector or RMatrix. There are currently exceptions to this which must be fixed.