Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/edenreich/asyncphp
A simple way to make async operations using PHP
https://github.com/edenreich/asyncphp
Last synced: about 4 hours ago
JSON representation
A simple way to make async operations using PHP
- Host: GitHub
- URL: https://github.com/edenreich/asyncphp
- Owner: edenreich
- License: mit
- Created: 2018-03-24T22:31:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-14T12:34:17.000Z (over 6 years ago)
- Last Synced: 2024-04-19T14:03:15.116Z (7 months ago)
- Language: PHP
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AsyncPHP
A simple way to make async operations using PHP
# Installation
in the terminal:
```sh
composer require reich/async
```# Usage
To create a new thread:
```php
$thread = new \AsyncPHP\Thread(function);
```To join the thread to the main context:
```php
$thread->join();
```To get the currently running threads:
```php
echo \AsyncPHP\Thread::$count
```# Note
This can only be used from the command line atm.