Function task::all_tasks

source ·
pub fn all_tasks() -> Vec<(usize, WeakTaskRef)>
Expand description

Returns a list containing a snapshot of all tasks that currently exist.

Usage Notes

  • This is an expensive and slow function, so it should be used rarely.
  • The existence of a task in the returned list does not mean the task will continue to exist at any point in the future, hence the return type of WeakTaskRef instead of TaskRef.