Lang Hames 0f622c507e
[orc-rt] Add TaskGroup for tracking completion of a set of tasks. (#187205)
TaskGroup provides a mechanism for tracking execution of multiple
concurrent tasks and receiving notification when all tasks have
completed. This is useful for coordinating asynchronous operations in
the ORC runtime.

TaskGroup::Token is an RAII handle representing participation in a
group. The group cannot complete while any valid (non-default) Token
exists.

TaskGroup::addOnComplete registers callbacks to run when the group
closes and all tokens are released. (Callbacks registered after
completion run immediately).

TalkGroup::close seals the group: no new tokens can be acquired after
close is called.

All methods may be called concurrently from multiple threads.
2026-03-18 18:55:15 +11:00
..