enableSembastCooperator function

  1. @visibleForTesting
void enableSembastCooperator(
  1. {int delayMicroseconds,
  2. int pauseMicroseconds}
)

Re-enable sembast cooperator or change default pause and delay

delayMicroseconds specifies at which frequency an heavy algorithm is paused. pauseMicroseconds specifies the duration of the pauseat which frequency an heavy algorithm is paused.

Implementation

@visibleForTesting
void enableSembastCooperator({int delayMicroseconds, int pauseMicroseconds}) {
  cooperatorDisabled = false;
  cooperatorDelayMicroseconds =
      delayMicroseconds ?? _cooperatorDelayMicrosecondsDefault;
  cooperatorPauseMicroseconds =
      pauseMicroseconds ?? _cooperatorPauseMicrosecondsDefault;
  globalCooperator.restart();
}