dev-master
9999999-dev https://github.com/andreyserdjuk/pcntl_job.gitAdapters for pcntl, cURL etc.
MIT
The Requires
- php >=5.3
pcntl
Wallogit.com
2017 © Pedro Peláez
Adapters for pcntl, cURL etc.
PcntlJob is simple PCNTL wrapper which allows to create child process in a friendly way., (*1)
Example:, (*2)
$childProcessesCount = 10;
$job = new Job($childProcessesCount);
// if parseRSS should be executed as class method in context, (example: $this)
$job->create(array($this, 'parseRSS'), array($href));
// or call as function
$job->create('parseRSS', array($href));
In child processes all active connections will be lost or their behavior becomes unpredictable (in my case: mysql can read but cannot write, redis loses all). So they should be reinitialized., (*3)
Adapters for pcntl, cURL etc.
MIT
pcntl