Is PHP thread
The facts I gathered so far are inconclusive:
What's your experience?
It's not only about segmentation faults ("access violations" in Windows nomenclature). There is a lot more to thread safety.
I know gettext and set_locale is not threadsafe. PHP should not be used with a threaded MPM.
PHP Isn't Thread-Safe Yet.
Running PHP not threaded.
See Where can I get libraries needed to compile some of the optional PHP extensions? for a list of thread-safe and nonthread-safe extensions (* marked are not thread-safe and others are).
A better question might be, "Is the following PHP code going to trigger access violations if MPM is used?" Or, "Have you experienced odd behavior likely attributed to concurrency issues using the following functions?"
Otherwise, it's Russian roulette. If you're using some packaged application, it may work just fine now but break a month from now when a new version of the application comes out.
I strongly advise against using MPM with PHP in general. However, if you have some small code to run, you could post it, and we could tell you if you're going to hit a pitfall.
链接地址: http://www.djcxy.com/p/57978.html上一篇: “char s [static 10]”这个函数的数组参数中static关键字的用途是什么?
下一篇: 是PHP线程