Non-blocking synchronization primitives for PHP based on Amp and Revolt.
Full Changelog: https://github.com/amphp/sync/compare/v2.1.0...v2.2.0
synchronized()
by @kelunik in https://github.com/amphp/sync/pull/26
SharedMemoryParcel
Full Changelog: https://github.com/amphp/sync/compare/v2.0.0...v2.1.0
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/pipeline
FileMutex
has been removed, as a better implementation ships as part of amphp/file
ThreadedMutex
and ThreadedSemaphore
Lock::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 Closable
Parcel
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 StaticKeyMutex
RateLimitingSemaphore
which releases locks after a given time elapses.StaticKeySemaphore
, analogous to StaticKeyMutex
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.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()
.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.
ConcurrentIterator
functions have been removed and will be available as operators in amphp/pipeline
FileMutex
has been removed, as a better implementation ships as part of amphp/file
ThreadedMutex
and ThreadedSemaphore
Lock::getId()
Barrier::await
supports cancellation nowsynchronized
accepts any Semaphore
now instead of a Mutex
onlyPosixSemaphore
deletion on PHP 8.Full Changelog: https://github.com/amphp/sync/compare/v1.4.1...v1.4.2