开发者

Does PHP5 support multi threading? [duplicate]

This question a开发者_运维技巧lready has answers here: Closed 12 years ago.

Possible Duplicate:

How can one use multi threading in php applications

Does anybody know whether or not PHP5 supports multi threading? If it does, how to implement that?


When using php as a module (like in apache), it's not possible. If you use php in CLI, you can use the function pcntl_fork


While you can use the pcntl extension to fork, please don't. It creates all sorts of entertaining issues, especially when you're using mod_php.

There are better ways. Try a work queue, like Gearman.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜