- Fixed cancellation trace recording in `TracingDriver`
### 2.3.1
- Fixed `TracingDriver` not overriding all methods.
2.3.0
-----
- Added `TracingDriver` to debug (hanging) tests / applications. The environment variable `AMP_DEBUG_TRACE_WATCHERS=true` can be set to automatically create a `TracingDriver` wrapping the actual driver. `TracingDriver::dump()` can be used to dump all enabled, referenced watchers keeping the loop running.
- Fixed backpressure release on `Emitter::emit()`, the backpressure is now released as soon as the value is consumed, instead of the next value being requested.
2.2.0
-----
- Added `CombinedCancellationToken`
- Added `delay()` as shortcut for `new Delayed`
### 2.1.2
- Fixed issue where the loop time in `NativeDriver` was not refreshed after waiting for I/O streams (#256)
- Fixed compatibility issue of `NativeDriver` with `pcntl_async_signals()` (#264)
- A custom queue is now used for timers in `NativeDriver` to allow cancelled timers to be garbage collected immediately instead of after their original expiration time (#220)
- Resolving a promise with an object that throws when destructed will now forward that exception to the event loop error handler (#271)
- Fixed loop time to support 32-bit systems (#252, #273)
### 2.1.1
- Fixed a bug in NativeDriver causing 100% CPU usage when any timers were used (#251)
- Resolution methods are now hidden in the `Promise` returned from `Deferred::promise()`. Their exposure was an implementation detail and never promised by the return type of `Deferred::promise()`.
- A named class is now used for promises, so you don't end up with an anonymous class in `var_dump()` and stack traces, which can be confusing.
- Fixed possible notices in `formatStacktrace()`. This is an internal API, but the notices might appear on certain stack traces when running with `AMP_DEBUG=true`.
- Fixed segfault with `ev`, see amphp/parallel-functions#3.
- Dropped multiple definitions of `Deferred` and `Emitter`. These were introduced as performance hack, but relied on `zend.assertions` being disabled to change behavior, which is bad. The performance impact is believed to be rather low, because coroutines are used a lot more than `Deferred` in Amp v2.
-`Loop::set()` replaces the current driver with a dummy driver for the time of `gc_collect_cycles()` now. This allows cyclic references to be cleaned up properly before the new driver is set. Without such a fix, cyclic references might have been cleaned up later, e.g. cancelling their watcher IDs on the new loop, thereby cancelling the wrong watchers.
*`Amp\reactor()` has been replaced with `Amp\Loop::set()` and `Amp\Loop::get()`.
*`Amp\driver()` has been replaced with `Amp\Loop\Factory::create()`.
*`Amp\tick()` no longer exists and doesn't have a replacement. Ticks are an internal detail.
* Functions for creating and managing watchers are now static methods of `Amp\Loop` instead of functions in the `Amp` namespace.
*`once()` is now `delay()` and `immediately()` is `defer()`.
* Parameter order for `delay()` and `repeat()` has been changed.
*`reference()` and `unreference()` have been added.
*`Amp\Pause` has been renamed to `Amp\Delayed` and accepts an optional resolution value now. Additionally `reference()` and `unreference()` methods have been added.
* Promise accepting functions have been moved to the `Amp\Promise` namespace.
*`Amp\Promise\some()` accepts an additional `$required` parameter.
*`Amp\call()`, `Amp\asyncCall()`, `Amp\coroutine()` and `Amp\asyncCoroutine()` have been added.
*`Amp\resolve()` has been removed, use `Amp\call()` instead.
*`Promise::when()` has been renamed to `Promise::onResolve()`
*`Promise::watch()` has been removed, use `Amp\Iterator`, [`amphp/byte-stream`](https://github.com/amphp/byte-stream) or a custom implementation that implements `Amp\Promise` instead and provides dedicated APIs to access the previously data shared via the `watch()` mechanism.
*`Amp\Iterator`, `Amp\Emitter` and `Amp\Producer` have been added with several functions in the `Amp\Iterator` namespace.