On Wed, April 26, 2006 6:05 pm, Warren Vail wrote:
> "not likely" until at least PHP 8.0.  However, my needs for a thread
> are
> very simple and might be able to avoid the complexities of shared

One thing you could consider...

If you had one "main" script that did a stream_select on multiple URLs
and polled them to get their output as it came about, you'd
essentially be using Apache's multi-process model instead...

Or you could just figure out what was wrong that was causing your
zombies and fix it... :-v

Another nifty hack is:

//An atomic way to claim these tasks as MINE
$process_id = getmypid();
$query = "UPDATE tasks set process_id = $process_id WHERE process_id
is NULL LIMIT 10";

You can then do the 10 tasks needed and die off.

Alter 10 to suit your needs, and have not as many php processes
running in parallel.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to