grandmasterx/yii2-multithreading

Multithreading class for php 5.3+

Installs: 89

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 2

Forks: 0

Open Issues: 1

Type:yii2-extension

pkg:composer/grandmasterx/yii2-multithreading

dev-master 2015-01-27 13:33 UTC

This package is not auto-updated.

Last update: 2025-09-27 21:38:37 UTC


README

Multithreading class for php 5.3+

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist grandmasterx/yii2-multithreading "*"

or add

"grandmasterx/yii2-multithreading": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

$threads = new Threads;
$threads->newThread(dirname(__FILE__).'/file.php', array());
while (false !== ($result = $threads->iteration())) {
    if (!empty($result)) {
        echo $result."\r\n";
    }
}
echo (date("H:i:s"));
$end = microtime(true);
echo "Execution time ".round($end - $start, 2)."\r\n";
die;