medeirosinacio/exec-multithread

A thread implementation in PHP using the exec function.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 1

Type:standard

pkg:composer/medeirosinacio/exec-multithread

dev-master 2020-04-16 18:54 UTC

This package is auto-updated.

Last update: 2025-10-17 07:04:39 UTC


README

php-exec-multithread

A thread implementation in PHP using the exec function.

Send job to worker with data:


    $thread = new  ExecMultithread();
    $thread->setProjectRoot('./');
    
    for ($i = 0; $i < 5; $i++) {
    	$data = "Bla Bla Bla... ID " . md5(rand(0, 5000));
    	$thread->startProcess('worker', $data);
    }
    
    $thread->getProcessesInfo();


get data worker:


   $data = ExecMultithread::convertData($argv[1])