- 🛠 Fixed issue where a promise would report as pending for some time after being cancelled.
- 🛠 Timers that are restarted after being unreferenced would become referenced again. This issue has now been fixed.
- ➕ Added
evextension. This loop is now the default event loop used if the
evextension is available.
Icicle\Promise\map()now accepts any number of arrays like
array_map(), passing an element of each array as an argument to the callback function.
- Coroutines are paused immediately upon cancellation to ensure execution does not continue after cancellation.
- ➕ Added
🆕 New Features
- 0️⃣ The default event loop can be swapped during execution. Normally this is not recommended and will break a program, but it can be useful in certain circumstances (forking, threading).
- ➕ Added the function
Icicle\Loop\with()that accepts a function that is run in a separate loop from the default event loop (a specific loop instance can be provided to the function). The default loop is blocked while running the loop.
setCallback()method that allows the callback invoked when an event occurs to be swapped without needing to create a new event.
- The cancellation callable is no longer passed to the
Icicle\Promise\Promiseconstructor, it should be returned from the resolver function passed to the constructor. This change was made to avoid the need to create reference variables to share values between functions. Instead values can just be used in the cancellation function returned from the resolver. The resolver function must return a
- Cancelling a promise is now an asynchronous task. Calling
Icicle\Promise\Promise::cancel()does not immediately call the cancellation method (if given), it is called later (like a function registered with
Icicle/Promise/PromiseInterfacenow includes an
isCancelled()method. When a promise is cancelled, this method will return true once the promise has been cancelled. Note that if a child promise is rejected due to an
$onRejectedcallable throwing after cancelling the parent promise,
isCancelled()of the child promise will return false because the promise was not cancelled, it was rejected from the
- 🛠 Fixed issue where
Icicle\Loop\SelectLoopwould not dispatch a signal while blocking. The issue was fixed by adding a periodic timer that checks for signals that may have arrived. The interval of this timer can be set with
- 🐎 Modified
Icicle\Promise\Promisefor better performance. The modified implementation eliminates the creation of one closure and only creates a queue of callbacks if more than one callback is registered to be invoked on fulfillment or rejection. No changes were made to functionality.
- 🐎 Modified
- 🚚 Moved Stream and Socket components to separate repositories: icicleio/stream and icicleio/socket. No API changes were made in these components from v0.6.0. If your project depends on these components, just add them as a requirement with composer.
🚀 See the release list for more information on previous releases.
🚀 [0.9.6]: https://github.com/icicleio/icicle/releases/tag/v0.9.6 🚀 [0.9.5]: https://github.com/icicleio/icicle/releases/tag/v0.9.5 🚀 [0.9.4]: https://github.com/icicleio/icicle/releases/tag/v0.9.4 🚀 [0.9.3]: https://github.com/icicleio/icicle/releases/tag/v0.9.3 🚀 [0.9.2]: https://github.com/icicleio/icicle/releases/tag/v0.9.2 🚀 [0.9.1]: https://github.com/icicleio/icicle/releases/tag/v0.9.1 🚀 [0.9.0]: https://github.com/icicleio/icicle/releases/tag/v0.9.0 🚀 [0.8.3]: https://github.com/icicleio/icicle/releases/tag/v0.8.3 🚀 [0.8.2]: https://github.com/icicleio/icicle/releases/tag/v0.8.2 🚀 [0.8.1]: https://github.com/icicleio/icicle/releases/tag/v0.8.1 🚀 [0.8.0]: https://github.com/icicleio/icicle/releases/tag/v0.8.0 🚀 [0.7.1]: https://github.com/icicleio/icicle/releases/tag/v0.7.1 🚀 [0.7.0]: https://github.com/icicleio/icicle/releases/tag/v0.7.0