v2.5.0
版本发布时间: 2016-12-22 22:11:47
reactphp/promise最新发布版本:v3.2.0(2024-05-24 18:41:18)
-
Revert automatic cancellation of pending collection promises once the output promise resolves. This was introduced in 42d86b7 (PR #36, released in v2.3.0) and was both unintended and backward incompatible.
If you need automatic cancellation, you can use something like:
function allAndCancel(array $promises) { return \React\Promise\all($promises) ->always(function() use ($promises) { foreach ($promises as $promise) { if ($promise instanceof \React\Promise\CancellablePromiseInterface) { $promise->cancel(); } } }); }
-
all()
andmap()
functions now preserve the order of the array (#77). -
Fix circular references when resolving a promise with itself (#71).