Amphp Sync Versions Save

Non-blocking synchronization primitives for PHP based on Amp and Revolt.

v2.2.0

2 months ago

What's Changed

Full Changelog: https://github.com/amphp/sync/compare/v2.1.0...v2.2.0

v2.1.0

8 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/sync/compare/v2.0.0...v2.1.0

v2.0.0

1 year ago

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.

Changes from 1.x

  • 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
  • Removed ThreadedMutex and ThreadedSemaphore
  • Removed Lock::getId()
  • Barrier::await supports cancellation now
  • synchronized accepts any Semaphore now instead of a Mutex only
  • Added Channel 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
  • Also added Parcel from amphp/parallel, which allows sharing a value across execution contexts with mutually-exclusive access to modifying that value using Parcel::synchronized().
  • Added createChannelPair() function which returns a pair of connected Channel objects.
  • Added RateLimitingSemaphore which releases locks after a given time elapses.
  • Added StaticKeySemaphore, analogous to StaticKeyMutex

Changes from 2.0.0 Beta 6

  • Added RateLimitingSemaphore which releases locks after a given time elapses.
  • Added StaticKeySemaphore, analogous to StaticKeyMutex

v2.0.0-beta.6

1 year ago
  • Add compatibility with Revolt v1.x

v2.0.0-beta.5

1 year ago
  • 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.4

2 years ago
  • PHP 8.1 now required.
  • Channel now extends Amp\Closable, which adds an onClose() method to attach a closure that is invoked when the channel closes.

v2.0.0-beta.3

2 years ago

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().

v2.0.0-beta.2

2 years ago

v2.0.0-beta.1

2 years ago

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
  • 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
  • Removed ThreadedMutex and ThreadedSemaphore
  • Removed Lock::getId()
  • Barrier::await supports cancellation now
  • synchronized accepts any Semaphore now instead of a Mutex only

v1.4.2

2 years ago

What's Changed

  • Fixed PosixSemaphore deletion on PHP 8.

Full Changelog: https://github.com/amphp/sync/compare/v1.4.1...v1.4.2