NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #309 most downloaded on Packagist
Non-blocking synchronization primitives for PHP based on Amp and Revolt.
Latest stable
v2.3.1
Last release 3 months ago
31 Jul 2026
Release timing varies
gaps range from 6 weeks to 1.9 years
Most releases are documented
notes for 11 of 13 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
20 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
Added an optional Cancellation parameter to the acquire() method on the Mutex, Semaphore, KeyedMutex, and KeyedSemaphore interfaces
Cancellation parameter to the acquire() method on the Mutex, Semaphore, KeyedMutex, and KeyedSemaphore interfacesCancellation parameter to the synchronized() and unwrap() methods on the Parcel interfaceAmp\Sync\synchronized with an optional Cancellation. This Cancellation instance is passed as a parameter to the closure provided.All implementations of the above modified interfaces have been updated to support optional cancellation. Like other interfaces which support optional cancellation, a cancellation need only be advisory, it may be ignored or does not need to guarantee cancellation of an operation.
Full Changelog: https://github.com/amphp/sync/compare/v2.3.1...v3.0.0-beta.1
Fixed internal state corruption when an exception is thrown by the semaphore while acquiring the lock in LocalKeyedSemaphore and RateLimitingSemaphore
LocalKeyedSemaphore and RateLimitingSemaphore.LocalParcel::synchronized() and SharedMemoryParcel::unwrap() if the underlying mutex throws an exception while acquiring a lock.Full Changelog: v2.3.0...v2.3.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Fixed posix semaphore blocking thread when there is no space left on device by @azjezz in https://github.com/amphp/sync/pull/29
createChannelPair() to specify a number of items which may be buffered in memory before back pressure is applied.Full Changelog: https://github.com/amphp/sync/compare/v2.2.0...v2.3.0
createChannelPair() to specify a number of items which may be buffered in memory before back pressure is applied.Full Changelog: v2.2.0...v2.3.0
Add PriorityQueue by @trowski in https://github.com/amphp/sync/pull/27
Full Changelog: https://github.com/amphp/sync/compare/v2.1.0...v2.2.0
Added re-entry support to synchronized() by @kelunik in https://github.com/amphp/sync/pull/26
synchronized() by @kelunik in https://github.com/amphp/sync/pull/26SharedMemoryParcelFull Changelog: https://github.com/amphp/sync/compare/v2.0.0...v2.1.0
synchronized() by @kelunik in #26SharedMemoryParcelFull Changelog: v2.0.0...v2.1.0
Channel now extends Amp\Closable , which adds an onClose() method to attach a closure that is invoked when the channel closes.
Channel now extends Amp\Closable, which adds an onClose() method to attach a closure that is invoked when the channel closes.This release moves Channel and Parcel interfaces from amphp/parallel to this library.
Channel allows two way communicate between execution contexts, such as two coroutines or two processes.Parcel allows sharing a value across execution contexts, with mutually-exclusive access to modifying that value using Parcel::synchronized().Stable release compatible with AMPHP v3 and fibers! 🎉
As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType> have been replaced with ResolutionType.
ConcurrentIterator functions have been removed are now available as methods on Pipeline in amphp/pipelineFileMutex has been removed, as a better implementation ships as part of amphp/fileThreadedMutex and ThreadedSemaphoreLock::getId()Barrier::await supports cancellation nowsynchronized accepts any Semaphore now instead of a Mutex onlyChannel from amphp/parallel, which allows two way communicate between execution contexts, such as two coroutines or two processes. Channel has been modified to extend ClosableParcel from amphp/parallel, which allows sharing a value across execution contexts with mutually-exclusive access to modifying that value using Parcel::synchronized().createChannelPair() function which returns a pair of connected Channel objects.RateLimitingSemaphore which releases locks after a given time elapses.StaticKeySemaphore, analogous to StaticKeyMutexRateLimitingSemaphore which releases locks after a given time elapses.StaticKeySemaphore, analogous to StaticKeyMutexNote: This is a pre-release, there might be breaking changes in the final stable version.
ConcurrentIterator functions have been removed and will be available as operators in amphp/pipelineFileMutex has been removed, as a better implementation ships as part of amphp/fileThreadedMutex and ThreadedSemaphoreLock::getId()Barrier::await supports cancellation nowsynchronized accepts any Semaphore now instead of a Mutex onlycreateChannelPair() to use the interfacecreateChannelPair()release() callsAdd compatibility with Revolt v1.x
Fixed return type of createChannelPair() to use the interface
createChannelPair() to use the interfacecreateChannelPair()release() callsChannel now extends Amp\Closable, which adds an onClose() method to attach a closure that is invoked when the channel closes.
Channel now extends Amp\Closable, which adds an onClose() method to attach a closure that is invoked when the channel closes.This release moves Channel and Parcel interfaces from amphp/parallel to this library.
This release moves Channel and Parcel interfaces from amphp/parallel to this library.
Channel allows two way communicate between execution contexts, such as two coroutines or two processes.Parcel allows sharing a value across execution contexts, with mutually-exclusive access to modifying that value using Parcel::synchronized().Update to revolt/event-loop v0.2.x
revolt/event-loop v0.2.x (https://github.com/amphp/sync/pull/20)Note: This is a pre-release, there might be breaking changes in the final stable version.
Note: This is a pre-release, there might be breaking changes in the final stable version.
ConcurrentIterator functions have been removed and will be available as operators in amphp/pipelineFileMutex has been removed, as a better implementation ships as part of amphp/fileThreadedMutex and ThreadedSemaphoreLock::getId()Barrier::await supports cancellation nowsynchronized accepts any Semaphore now instead of a Mutex onlyFixed PosixSemaphore deletion on PHP 8.
PosixSemaphore deletion on PHP 8.Full Changelog: https://github.com/amphp/sync/compare/v1.4.1...v1.4.2
Fix typo by @b1rdex in https://github.com/amphp/sync/pull/16
Full Changelog: https://github.com/amphp/sync/compare/v1.4.0...v1.4.1
Added Amp\Sync\ConcurrentIterator\transform()
Amp\Sync\BarrierAmp\Sync\ConcurrentIterator\transform()Amp\Sync\ConcurrentIterator\map()Amp\Sync\ConcurrentIterator\filter()Amp\Sync\ConcurrentIterator\each()Mutex extends Semaphore now as a Mutex is a special form of Semaphore with exactly one lock
KeyedSemaphoreLocalKeyedSemaphorePrefixedKeyedSemaphoreMutex extends Semaphore now as a Mutex is a special form of Semaphore with exactly one lockNothing published for this version
Deprecated ThreadedMutex because ext-pthreads development halted (see krakjoe/pthreads#929)
KeyedMutexPrefixedKeyedMutexStaticKeyMutexThreadedMutex because ext-pthreads development halted (see krakjoe/pthreads#929)ThreadedSemaphore because ext-pthreads development halted (see krakjoe/pthreads#929)Removed usage of anonymous class in ThreadedMutex and ThreadedSemaphore, instead both now use an internal pre-defined class. Anonymous classes cannot
Removed usage of anonymous class in ThreadedMutex and ThreadedSemaphore, instead both now use an internal pre-defined class. Anonymous classes cannot be transferred to a thread, so previously they could not actually be used in a thread as intended… oops…
Nothing published for this version
One column per quarter.