|
Posted by Chris Hope on 05/21/07 02:45
Benjamin wrote:
> On May 20, 8:55 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> Graham Weldon wrote:
>> > Has anyone got any information or links for some tutorials on
>> > threading with PHP?
>> > I was looking at running a socket listener, and launch off new
>> > threads, and co-ordinate as requests come in.
>>
>> The PHP cli doesn't support multithreading. You can get multiple
>> threads if you're running as an Apache or IIS extension and the
>> webserver is running multiple threads, but that's all.
>
> That's not completely true. You can the Process Control Functions
> (http://www.php.net/manual/en/ref.pcntl.php). However, they're only
> avaible on Unix like systems.
That's process forking, which isn't quite the same as multi-threading.
However it can be extremely useful depending on your requirements.
--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
[Back to original message]
|