Re: Command-line PHP script CPU usage goes sky-high, stays there--why?
| From: | Jochem Maas | Date: | Tue, 11 Dec 2007 14:15:47 +0000 |
| Subject: | Re: Command-line PHP script CPU usage goes sky-high, stays there--why? | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265680@lists.php.net to get a copy of this message | ||
Per Jessen wrote:
> 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.
>
any chance of an example from you too?
>
> /Per Jessen, Zürich
>