An open API service indexing awesome lists of open source software.

https://github.com/6dreams/parallel-pool

Provides pthread's pool when using parallel
https://github.com/6dreams/parallel-pool

ext-parallel php pooling

Last synced: about 1 month ago
JSON representation

Provides pthread's pool when using parallel

Awesome Lists containing this project

README

          

# Pools in php-parallel extension
Provides simmular pool interface in parallel as pthreads.

## Usage
```php
$pool = new Pool(
__DIR__ . '/bootstrap_or_autoloader.php',
2,
static function (ThreadConfigInterface $config) {
echo $config->getId() . "\n";
}
);

$pool->submit([]);
$pool->submit([]);
$pool->submit([]);
$pool->submit([]);
$pool->submit([]);

while ($pool->collect()) {
\usleep(0);
}
```