PHP Classes

Looks like you should use pcntl_wait()

Recommend this page to a friend!

      Threadable  >  All threads  >  Looks like you should use pcntl_wait()  >  (Un) Subscribe thread alerts  
Subject:Looks like you should use pcntl_wait()
Summary:Using pcntl_wait() instead of exit; help stopping loose threads
Messages:1
Author:Jon Lennryd
Date:2017-09-13 16:17:31
 

  1. Looks like you should use pcntl_wait()   Reply   Report abuse  
Picture of Jon Lennryd Jon Lennryd - 2017-09-13 16:17:31
Hi, in Threadable::fork() you call exit; when all fork and done. This seems dangerous, the recommended is to wait using pcntl_wait().

Please see the first example in the docs:
php.net/manual/en/function.pcntl-fo ...