yieldNow static method

Future<void> yieldNow()

Yields the current time slice to the host event loop, resuming when the host turns.

Resets the slice stopwatch upon resuming.

await BloomScheduler.yieldNow();

Implementation

static Future<void> yieldNow() async {
  _sliceStopwatch.stop();
  await _host.yieldToHost();
  _sliceStopwatch.reset();
  _sliceStopwatch.start();
}