setResponse method

void setResponse(
  1. DataPackage responsePackage
)

Implementation

void setResponse(DataPackage responsePackage)
{
    this._successful = true;

    if(!_completer.isCompleted)
    {
        _completer.complete(responsePackage);
    }

    this._finished = true;

    // This is thread safe, as FuturesList is thread safe
    this.futuresTableInHandler.removeFuture(this);
}