Download the PHP package uppes/eventloop without Composer
On this page you can find all versions of the php package uppes/eventloop. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download uppes/eventloop
More information about uppes/eventloop
Files in uppes/eventloop
Package eventloop
Short Description An event loop library for asynchronous PHP programming.
License MIT
Homepage https://github.com/uppes/eventloop
Informations about the package eventloop
Event Loop
This library's core uses the reactor pattern to handle normally blocking I/O function/event calls.
Concepts
The Reactor and Singleton Pattern video
Patterns and Frameworks for Synch Event Handling, Connections, and Service Initialization video
The reactor pattern is an event handling pattern for handling service requests delivered concurrently to a service handler by one or more inputs. @see Reactor - An Object Behavioral Pattern for Demultiplexing and Dispatching Handles for Synchronous Events.
PHP wasn't built from the ground up with an Event Loop concept in mind, like other Languages, Python, JavaScript for one.
Like Python and JavaScript, PHP is single threaded. It can handle asynchronous event base programming quite well, however there is no standard library way to implement.
Event Loop From the Inside Out video
Help I'm stuck in an event loop video
What Is Async, How Does It Work, and When Should I Use It? video
Common asynchronous patterns video
In order to have any async behavior programming, the based libraries needs to be interoperable, and they need to use the same event loop.
This Event Loop form the the basics for our Promise/A+ package.
This component provides a common LoopInterface
that any library can target. This allows them to be used in the same loop, with one single run()
call that is controlled by the user.
Table of Contents
- Quickstart example
- Usage
- Loop
- getInstance()
- Loop implementations
- Stream_Select()
- LoopInterface
- getInstance()
- addTimeout()
- setInterval()
- clearInterval()
- addReadStream()
- addWriteStream()
- removeReadStream()
- removeWriteStream()
- run()
- tick()
- stop()
- addTick()
- addSignal()
- removeSignal()
- Install
- Tests
- License
License
The MIT License (MIT). Please see License File for more information.