runWithDomain<T> abstract method

T runWithDomain<T>(
  1. T fn()
)

Executes a function fn within the scope of this protection domain.

Temporarily sets this domain as the current one, then restores the previous.

Example:

myDomain.runWithDomain(() {
  // Executes in myDomain context
});

Implementation

T runWithDomain<T>(T Function() fn);