public function done(callable $onFulfilled = null, callable $onRejected = null, callable $onCancel = null)
{
if (null !== $this->result) {
$this->getResult()->done($onFulfilled, $onRejected, $onCancel);
}
$this->handlers[] = function (PromiseInterface $promise) use($onFulfilled, $onRejected, $onCancel) {
$promise->done($onFulfilled, $onRejected, $onCancel);
};
}