amphp/sync
Non-blocking synchronization primitives for PHP based on Amp and Revolt.
v2.3.0
67M downloads/mo
#345 most downloaded on Packagist
amphp/sync
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 6 weeks to 1.5 years
Some releases are documented
notes for 4 of 12 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
18 releases · first in 2017
0 releases in the last 12 months
see the full history below
Release timeline
18 releases · Nov 2017 to Aug 2024Releases
latest 18-
v2.3.003 Aug 2024Release notes
Open source →What's Changed
- Fixed posix semaphore blocking thread when there is no space left on device by @azjezz in #29
- Added a buffer size parameter to
createChannelPair()to specify a number of items which may be buffered in memory before back pressure is applied.
New Contributors
Full Changelog: v2.2.0...v2.3.0
-
v2.2.012 Mar 2024Release notes
Open source → -
v2.1.019 Aug 2023Release notes
Open source →What's Changed
- Added re-entry support to
synchronized()by @kelunik in #26 - Fixed error handling in
SharedMemoryParcel - Fixed a typo by @thgs in #25
New Contributors
Full Changelog: v2.0.0...v2.1.0
- Added re-entry support to
-
v2.0.030 Dec 2022Release notes
Open source →- PHP 8.1 now required.
Channelnow extendsAmp\Closable, which adds anonClose()method to attach a closure that is invoked when the channel closes.
Release notes
Open source →This release moves
ChannelandParcelinterfaces fromamphp/parallelto this library.Channelallows two way communicate between execution contexts, such as two coroutines or two processes.Parcelallows sharing a value across execution contexts, with mutually-exclusive access to modifying that value usingParcel::synchronized().
Release notes
Open source →Note: This is a pre-release, there might be breaking changes in the final stable version.
- Major release avoiding promises in favor of fibers supported by Revolt
ConcurrentIteratorfunctions have been removed and will be available as operators inamphp/pipelineFileMutexhas been removed, as a better implementation ships as part ofamphp/file- Removed
ThreadedMutexandThreadedSemaphore - Removed
Lock::getId() Barrier::awaitsupports cancellation nowsynchronizedaccepts anySemaphorenow instead of aMutexonly
Release notes
Open source →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 withResolutionType.Changes from 1.x
ConcurrentIteratorfunctions have been removed are now available as methods onPipelineinamphp/pipelineFileMutexhas been removed, as a better implementation ships as part ofamphp/file- Removed
ThreadedMutexandThreadedSemaphore - Removed
Lock::getId() Barrier::awaitsupports cancellation nowsynchronizedaccepts anySemaphorenow instead of aMutexonly- Added
Channelfromamphp/parallel, which allows two way communicate between execution contexts, such as two coroutines or two processes.Channelhas been modified to extendClosable - Also added
Parcelfromamphp/parallel, which allows sharing a value across execution contexts with mutually-exclusive access to modifying that value usingParcel::synchronized(). - Added
createChannelPair()function which returns a pair of connectedChannelobjects. - Added
RateLimitingSemaphorewhich releases locks after a given time elapses. - Added
StaticKeySemaphore, analogous toStaticKeyMutex
Changes from 2.0.0 Beta 6
- Added
RateLimitingSemaphorewhich releases locks after a given time elapses. - Added
StaticKeySemaphore, analogous toStaticKeyMutex
Release notes
Open source →- Fixed return type of
createChannelPair()to use the interface - Fixed close of channels returned from
createChannelPair() - Release locks synchronously instead of asynchronously on explicit
release()calls
-
v2.0.0-beta.607 Nov 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.513 Jul 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.403 Apr 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.306 Feb 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.203 Feb 2022 pre-releaseNothing published for this version
-
v2.0.0-beta.106 Dec 2021 pre-releaseNothing published for this version
-
v1.4.225 Oct 2021Nothing published for this version
-
v1.4.125 Oct 2021Nothing published for this version
-
v1.4.007 May 2020Nothing published for this version
-
v1.3.008 Nov 2019Nothing published for this version
-
v1.2.026 Sep 2019Nothing published for this version
-
v1.1.024 Sep 2019Nothing published for this version
-
v1.0.129 Nov 2017Nothing published for this version
-
v1.0.029 Nov 2017Nothing published for this version