run<R> method

R run<R>(
  1. R callback()
)

Executes callback with this scope as the active Ls.currentScope.

Returns the result of callback.

Implementation

R run<R>(R Function() callback) {
  return runZoned(
    callback,
    zoneValues: {Ls.zoneScopeKey: this},
  );
}