Class
DexTaskGroup
unstable since: 1.2
Description [src]
final class Dex.TaskGroup : GObject.TypeInstance
{
/* No available fields */
}
A structured scope for related DexFuture instances.
A task group owns the futures added to it until the group is closed or
cancelled. The group itself is also a DexFuture, so callers can
await the scope to learn when all tracked futures have finished.
Use dex_task_group_add() to attach futures explicitly, or pass NULL
to dex_task_group_add() after pushing a thread-default group with
dex_task_group_push_thread_default(). Close the group with
dex_task_group_close() once no more futures will be added.
Cancellation is stronger than ordinary discard-driven cleanup: calling
dex_task_group_cancel() cancels all tracked children, including nested
task groups, and completes the task group with a cancellation error. When
dex_task_group_close() is used instead, the task group resolves only
after every tracked future has resolved or rejected.
Developer note: always pair dex_task_group_push_thread_default() with
dex_task_group_pop_thread_default() on the same thread, and prefer
dex_task_group_close() over relying on finalization to finish work.
Available since: 1.2