wlandau / crew

A distributed worker launcher
https://wlandau.github.io/crew/
Other
123 stars 4 forks source link

Use nanonext::.unresolved() #49

Closed wlandau closed 1 year ago

wlandau commented 1 year ago

From https://github.com/shikokuchuo/mirai/issues/37, it will be much faster for crew than mirai::unresolved() when the task data is large.

wlandau commented 1 year ago

This means I can remove the n argument from collect() with no loss of efficiency!

wlandau commented 1 year ago

Thinking about how to manage this back-compatibly. Maybe I want to grab the function only if it exists in nanonext:

if (exists(x = ".unresolved", envir = getNamespace(name = "nanonext"))) {
  mirai_unresolved <- eval(expr = parse(text = "nanonext::.unresolved"))
} else {
  mirai_unresolved <- nanonext::unresolved
}

The eval(parse()) is to hide from the R CMD check static code analyzer.

wlandau commented 1 year ago

Then when the next nanonext is released, I can revert this workaround and require that version of nanonext.

wlandau commented 1 year ago

5c046c95bd496564e4ee3f35c921b97d2f983164 moves entirely to .unresolved() and requires the recently released version 0.8.1 of nanonext.