Scheduler.CompleteAll or Scheduler.CombineDependencies(JobHandle, JobHandle)
thygrrr opened this issue · 1 comments
thygrrr commented
Because tracking dependencies is quite inconvenient (both with or without the ability to stackalloc, etc.), I would like to recommend providing an API that allows completing all outstanding dependencies on the Scheduler level.
Alternatively, an easier way to combine dependencies without heap-allocated objects would be great; e.g. combining two dependencies individually, iteratively.
I believe there are two styles of use for a scheduler:
- the Unity style (which ZeroAlloc seems to mimick / which Unity seems to copy from ZeroAlloc)
- the "I have a tightly defined workload, a delegate pointing to it, and want it done with zero allocations while I synchronously wait"-style, which neither
ThreadPool.QueueUserWorkItem
nor anything in the TPL offer.
The latter is tedious with the way Completing dependencies currently works.
The former is debatably great and flexible. (it's also a path straight into a self-made dependency hell)
thygrrr commented
Closed because there's competing/duplicate API in JobHandle.CompleteAll (huh ?!?)