On Fri, Aug 14, 2009 at 8:37 PM, dan nessett<[email protected]> wrote: > While my machine was compiling AMP components, I thought about this a little > bit. It seems weird that the implementation of a language intended to provide > backend functionality for web servers isn't thread safe. Apache and other web > server software must be threaded operationally towards infinity. How do they > deal with using a non-thread safe library? Each time a thread executes PHP > code does it have to grab a lock that protects the whole PHP library?
mod_php, CGI, FastCGI, etc. are normally used in a multi-process fashion, rather than multithread. Each instance of PHP uses one process, so they all have independent address spaces and so on. If one crashes it also won't bring down any others, which is convenient in PHP's case, since it's pretty easy to segfault. _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
