You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i need to create worker inside other worker and then correctly stop(destroy) it after it do some job.
something like that:
$small_worker = new Worker();
$small_worker->onWorkerStart = function() use (&$small_worker) {
echo "I've worked and that's enough.\n";
//$small_worker->stop(); //does not work (
//Worker::stop(); //does not work (
die(); // work, but i'm not sure if it's right
}
Thanks
The text was updated successfully, but these errors were encountered:
Walkor, I used this code ( Worker::stopAll(); ) and it seemed to me that everything works fine. But it's not.
stopAll() will stop mу small_worker AND parent worker too.
But as i wrote i need start small_worker, do some job asynchronously from parent in onWorkerStart and end it without stoppping parent worker.
Hi, i need to create worker inside other worker and then correctly stop(destroy) it after it do some job.
something like that:
Thanks
The text was updated successfully, but these errors were encountered: