You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever you find yourself setting the future plan inside a function, make sure that your changes are undone when the function exits. This is very important, because the user might have set the future plan they prefer, and will become rather confused if their settings all of a sudden are changed. If your function is called by another function or package, this might be quite tricky for the user to track down. Also, since you're using all cores (but one)(*), after your function has been called, anything that rely on Futureverse will max out like that. To fix this, please see Section 'For package developers' in help("plan", package = "future").
(*) Which is a no-no on CRAN (), but also elsewhere, e.g. https://www.jottr.org/2022/12/05/avoid-detectcores/
() Yes, availableCores() will return 2 when R CMD check is running, so you're saved by it here.
The text was updated successfully, but these errors were encountered:
Congrats to the CRAN release. Author of Futureverse here. I've got two comments, one smaller and one important one:
In
simIDM/R/corPFSOS.R
Line 317 in dd4cebc
instead of
max(1, parallelly::availableCores() - 1)
, you can useparallelly::availableCores(omit = 1)
, which is mentioned on https://parallelly.futureverse.org/reference/availableCores.html.Whenever you find yourself setting the future plan inside a function, make sure that your changes are undone when the function exits. This is very important, because the user might have set the future plan they prefer, and will become rather confused if their settings all of a sudden are changed. If your function is called by another function or package, this might be quite tricky for the user to track down. Also, since you're using all cores (but one)(*), after your function has been called, anything that rely on Futureverse will max out like that. To fix this, please see Section 'For package developers' in
help("plan", package = "future")
.(*) Which is a no-no on CRAN (), but also elsewhere, e.g. https://www.jottr.org/2022/12/05/avoid-detectcores/
() Yes,
availableCores()
will return2
whenR CMD check
is running, so you're saved by it here.The text was updated successfully, but these errors were encountered: