Re: Command-line PHP script CPU usage goes sky-high, stays there--why?
| From: | Per Jessen | Date: | Tue, 11 Dec 2007 13:29:50 +0000 |
| Subject: | Re: Command-line PHP script CPU usage goes sky-high, stays there--why? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265679@lists.php.net to get a copy of this message | ||
Jochem Maas wrote:
> Nathan Rixham wrote:
>>
>> Key I find though is multithreading, listener thread with
>> stream_socket_server, 2 or 3 stream_socket_accept threads and a pair
>> of new thread spawned to handle each connection (one to read, one to
>> write) (not needed for stateless http style request processing).
>>
>> Nathan
> hi Nathan,
>
>
> any chance of a 'full blown' example for all the muppets who want to
> try and grok this stuff? (bork bork, say I :-))
I'd be interested to see how he does the multi-threading in php.
Personally I'd always opt for C to write this type of thing, except for
perhaps the most simple cases.
/Per Jessen, Zürich