Skip to main content

Module task_group

Module task_group 

Source

Structsยง

Inner ๐Ÿ”’
Shared state of a TaskGroup. Held behind an Arc so each task can keep a Weak reference back to the group and remove itself on completion, without forcing callers to wrap the group in an Arc.
PanicGuard ๐Ÿ”’
Lives inside the spawned task. If the task or its callback panics, it signals cancel_flag and removes the task from the group, so cancel does not wait forever.
TaskGroup
TaskGroup A group that contains spawned tasks.
TaskHandler
TaskHandler

Enumsยง

TaskResult
The result of a spawned task.

Functionsยง

remove_from_group ๐Ÿ”’
Removes a task from its group. Detach instead of dropping the handler, so the task is not cancelled from within itself. If cancel already took it out, this is a no-op.

Type Aliasesยง

TaskID
Identifies a spawned task within a TaskGroup.