execute<T> method
Registers and schedules a task
that returns a single value.
Returns a future that completes with the task's value.
Implementation
Future<T> execute<T>(Future<T> Function(W worker) task,
{PerfCounter? counter}) =>
scheduleTask(task, counter: counter).value;