Closed schlichtanders closed 2 months ago
This is not exactly a bug per-se, as we've always only unwrapped EagerThunk
dependencies when passed as explicit arguments to Dagger.@spawn
.
Yet, it is also desirable to allow something like this, where the EagerThunk
is embedded within a closure. I have a branch where I've worked on this, but it never materialized since we need to both pull out such implicit arguments from the closure, but also put them back into the same closure, which I couldn't figure out how to do.
Anyway, I agree that it's worth doing this, but it will take some time to implement, and it's not my top priority. In the meantime, either use Dagger.spawn
or instead pass it as an explicit argument.
While trying to workaround https://github.com/JuliaParallel/Dagger.jl/issues/478
I came up with the following version which still fails, but for reasons related to
@spawn
in@spawn lock(() -> fit!(agg(), data), lck)
.results in the following error
This might relate to https://github.com/JuliaParallel/Dagger.jl/issues/357, but I am unsure.