Codebase list php-react-promise / 77f78d9
Avoid unnecessary creation of closures when no canceller is given Jan Sorgalla 9 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
2222 {
2323 if (null !== $this->result) {
2424 return $this->result->then($onFulfilled, $onRejected, $onProgress);
25 }
26
27 if (null === $this->canceller) {
28 return new static($this->resolver($onFulfilled, $onRejected, $onProgress));
2529 }
2630
2731 $this->requiredCancelRequests++;