docs: public void removeListener(CancellationListener cancellationListener) {
      if (!canBeCancelled()) {
        return;
      }
      synchronized (this) {
        if (listeners != null) {
          for (int i = listeners.size() - 1; i >= 0; i--) {
            if (listeners.get(i).listener == cancellationListener) {
              listeners.remove(i);
              // Just remove the first matching listener, given that we allow duplicate
              // adds we should allow for duplicates after remove.
              break;
            }
          }
          // We have no listeners so no need to listen to our parent
          if (listeners.isEmpty()) {
            if (cancellableAncestor != null) {
              cancellableAncestor.removeListener(parentListener);
            }
            listeners = null;
          }
        }
      }
    }