kvark / choir

Task Orchestration Framework
MIT License
52 stars 3 forks source link

Child task forks semantics could be better #22

Closed kvark closed 2 years ago

kvark commented 2 years ago

Currently, when forking a task, the child inherits all of the dependents. This is generally useful, but can become a pitfall for the following cases:

  1. New dependents may appear at any moment, which would make forking a race against adding new dependents.
  2. join() doesn't know or care about forked tasks, so the parent will technically finish before the children.

Instead, it would seem natural to expect that all the children are opaque to the caller. Join() should wait for all, and dependents should be propagated to all, or simply shared.