public function __construct($pid, callable $success = null, callable $failure = null, callable $cancel = null, $timeout = 0.0)
{
$this->pid = $pid;
$this->success = $success !== null ? $success : function () {
};
$this->failure = $failure !== null ? $failure : function () {
};
$this->cancel = $cancel !== null ? $cancel : function () {
};
$this->timeout = $timeout;
}