stabilize method

Future<void> stabilize({
  1. void runAndTrackSideEffects()?,
  2. int threshold = 100,
})

Runs update until it completes with false, reporting stabilized.

If more then threshold attempts occur, throws WillNeverStabilizeError.

Implementation

Future<void> stabilize({
  void Function()? runAndTrackSideEffects,
  int threshold = 100,
}) async {
  if (runAndTrackSideEffects != null) {
    await update(runAndTrackSideEffects);
  }
  return stabilizeWithThreshold(threshold);
}