PHPackages                             jsor/global-loop - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. jsor/global-loop

ActiveLibrary[Queues &amp; Workers](/categories/queues)

jsor/global-loop
================

A global event loop for ReactPHP.

v1.0.0(8y ago)214MITPHPPHP ^7.1

Since Aug 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/jsor-labs/global-loop)[ Packagist](https://packagist.org/packages/jsor/global-loop)[ Docs](https://github.com/jsor-labs/global-loop)[ RSS](/packages/jsor-global-loop/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Global Loop
===========

[](#global-loop)

A global event loop for [ReactPHP](http://reactphp.org).

Installation
------------

[](#installation)

Install the latest version with [Composer](https://getcomposer.org).

```
composer require jsor/global-loop
```

Check the [Packagist page](https://packagist.org/packages/jsor/global-loop)for all available versions.

Usage
-----

[](#usage)

Typical applications use a single event loop. ReactPHP requires that you pass the loop instance around, eg. as argument to functions and class constructors.

This library allows to use a single event loop instance from everywhere by providing static global accessors.

The only requirement is to call the static `Jsor\GlobalLoop::run()` at the end of your program.

```
