uppes/eventloop

This package is abandoned and no longer maintained. The author suggests using the techno-express/eventloop package instead.

An event loop library for asynchronous PHP programming.

1.1.7 2019-05-07 14:51 UTC

This package is auto-updated.

Last update: 2022-02-01 13:15:50 UTC


README

Build StatuscodecovCodacy Badge

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

License

The MIT License (MIT). Please see License File for more information.