Posted by Chris Hope on 05/15/06 04:53
aladdin wrote:
> Hi, all.
>
> I'm trying to write a mutlithreading server with standalone PHP.
> Concurrent requests is possible. Normally it is done by handling each
> socket spawn by serversocket in separate threads. But it seems that
> there is no thread support in PHP at all.
>
> Would anyone give me some suggestions?
>
> BTW, is the community considering add thread support to PHP in the
> future? What is the major difficulty to import an existing thread
> library (such as pthread library) into PHP?
You can fork a process but not do multi-threading.
More info here:
http://www.php.net/pcntl_fork
http://www.electrictoolbox.com/article/php/process-forking/
--
Chris Hope | www.electrictoolbox.com | www.linuxcdmall.com
Navigation:
[Reply to this message]
|