Kraken Framework Loop Component.
Note: This repository is a part of Kraken Framework, but can be used freely as standalone library. If you are interested in more asynchronous components for PHP, check out the rest of Kraken repository or see our asynchronous application skeleton example.
Loop is a component that provides abstraction layer for writing asynchronous code in PHP on single thread or process with usage of single or multiple loops.
- Interface for writing asynchronous code on single Thread or Process,
- File descriptor polling,
- One-time and periodic timers,
- Deferred execution of callbacks,
- Support for StreamSelect -based loops,
Support for LibEvent -based loops, Support for LibEv -based loops, Support for ExtEvent -based loops,
- Support for using multiple loops with multiple execution flows,
- Support for switching between loops and importing/exporting its unfinished queues,
- ReactPHP compatibility,
- ReactPHP EventLoop adapters,
- Kraken Framework compatibility,
- ...and more.
See more examples in official documentation.
- PHP-5.6 or PHP-7.0+,
- UNIX or Windows OS.
composer require kraken-php/loop
Tests are provided within our write-only Framework repository.
Documentation for this module can be found in the official documentation.
This library is read-only subtree split of Kraken Framework. To make contributions, please go to Framework repository.
This library licensed under the MIT license, see more information in Kraken Framework license section.