Skip to content

Releases: amphp/amp

2.2.1

21 Sep 21:32
v2.2.1
Compare
Choose a tag to compare
  • 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

02 Aug 20:45
v2.2.0
Compare
Choose a tag to compare
  • Added CombinedCancellationToken
  • Added delay() as shortcut for new Delayed

2.1.2

10 Jun 18:11
Compare
Choose a tag to compare
  • 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

11 Dec 10:33
Compare
Choose a tag to compare
  • Fixed a bug in NativeDriver causing 100% CPU usage when any timers were used (#251)

2.1.0

10 Dec 19:20
v2.1.0
Compare
Choose a tag to compare
  • Make use of hrtime() as monotonic time source if available (PHP 7.3)
  • Added Amp\Iterator\toArray()
  • Added Amp\Promise\timeoutWithDefault() (#245)
  • Added Amp\Promise\wrap() (#234)
  • Added Amp\Loop::now()
  • Fixed stale NativeDriver::$now values (#243)

2.0.7

30 Apr 20:54
v2.0.7
Compare
Choose a tag to compare
  • Fixed recording of stack traces for double resolution in case AMP_DEBUG was not set as environment variable, defaulting to 0 now. (#217)
  • Loop::unreference() is ignored on invalid watchers now.
  • Invoke UV watchers in case no events or UV_DISCONNECT is indicated.
  • Ignore Loop::$driver not being set during shutdown, which might happen due to the unreliable shutdown order. (#212)

2.0.6

27 Jan 19:19
v2.0.6
Compare
Choose a tag to compare
  • 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.

2.0.5

19 Dec 17:34
v2.0.5
Compare
Choose a tag to compare
  • 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.

2.0.4

05 Dec 07:57
v2.0.4
Compare
Choose a tag to compare
  • Allow AMP_DEBUG to be defined via the environment.
  • Fix formatting of stack traces used for double resolution debugging.

2.0.3

07 Nov 09:05
v2.0.3
Compare
Choose a tag to compare
  • 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.
  • Promise combinator functions (all(), any(), first(), some()) now preserve order of the given $promises array argument.