Open tecosaur opened 9 months ago
How would this be different than pmap
?
In effect? Upon inspection, not much, since pmap
already does dynamic scheduling*. However, I think this is could worth doing for the sake of discovery and API consistency. See the first X-ref.
*Maybe this is worth adding to the docs? I wasn't actually aware of this until I tried it.
For me @distributed
has been something that I would love to remove, but of course we can't since that would be API breaking.
But Distributed.jl needs some love so I don't want to discourage you :)
It is great that
@threads
now supports (and uses by default):dynamic
scheduling. As a mirror to that, it would make quite a bit of sense if@distributed
could handle dynamic scheduling. As I currently understand it, the best way to currently achieve this would be:It would be both much nicer, and I think rather appropriate if
@distributed
accepted a:static
/:dynamic
scheduling argument like@threads
does, and allowed for the following instead of the above:Going further, I think that
:dynamic
could actually be a sensible default for distributed scheduling.Xref: JuliaLang/julia#17887 for having a consistent distributed/threaded API Xref: JuliaLang/julia#41966 for tedious channel taking Xref: JuliaLang/julia#48515 for iterating a
RemoteChannel
Xref: JuliaLang/julia#33892 for maybe using aCachingPool
too?