Skip to content

0.5.0

Latest
Compare
Choose a tag to compare
@dktapps dktapps released this 22 May 23:50
· 1 commit to master since this release
a86d9ee

Changes since 0.4.x

General

  • PHP 8.1 or newer is now required.
  • ext-pmmpthread 6.0 or newer is now required.

API changes

  • SleeperHandler::addNotifier() now returns SleeperHandlerEntry. This is a thread-safe object used to create SleeperNotifier, and should be passed to the destination thread.
  • SleeperHandler::addNotifier() no longer accepts SleeperNotifier. Notifiers are now created using SleeperHandlerEntry::createNotifier().
  • SleeperHandler::removeNotifier() now accepts int $notifierId. This allows the main thread to retain only the notifier ID for later cleanup, saving memory.
  • SleeperNotifier is no longer thread-safe, and must be instantiated within the destination thread using SleeperHandlerEntry::createNotifier(). Since the notification delivery does not require the notifier itself to be a thread-safe object, this allows for better performance by avoiding unnecessary locking and the inherent overhead of thread-safe objects.