public void allowBackgroundTasks(boolean resetState) {
    if (resetState) {
      mySuspendBackgroundTasksCounter.set(0);
    }
    else {
      if (mySuspendBackgroundTasksCounter.decrementAndGet() < 0) {
        mySuspendBackgroundTasksCounter.incrementAndGet();
      }
    }
  }
public void allowBackgroundTasks(boolean resetState)