execute<T> method

Future<T> execute<T>(
  1. Future<T> task(
    1. W worker
    ), {
  2. PerfCounter? counter,
})

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;