private synchronized boolean wasCancelled() {
    return isClosed() && !isFinished();
  }
Subclasses should override this method to close the result that is not needed anymore.

<p>This method is called in two cases: 1. to clear the result when data source gets closed 2.
to clear the previous result when a new result is set
fbcore/src/main/java/com/facebook/datasource/AbstractDataSource.java