Closed AQLT closed 3 years ago
JDemetra itself uses explicitly several processors only in multi-processing objects. However, Java uses other threads for its own needs, for instance in the garbage collector or in streams. No problem to limit the number of processors as you propose.
Every time I submit a new version of RJDemetra (or another package that uses it), I have questions about if the package uses more that 2 cores. The questioning comes from the fact that some notes are produces when checking the package that cannot be explained if there is no multithreading. For example:
Or
For CRAN policies, we shouldn't use more than 2 cores by default. I thought RJDemetra didn't use multi-threading but maybe I'm wrong (for example, it seems to be used in tstoolkit). Using the following option seems to limit the result of
Runtime.getRuntime().availableProcessors()
to maximum 2 (and so to the solve the CRAN issue):We could add an option to set this parameter when loading the package. What do you think @palatej ?