Il Wed, 31 Oct 2012 11:57:11 +0100, marco@xxxxxxxxxx ha scritto: > But it if PHP would be threadsafe, you would be able to run the Apache > in a much faster and less memory using way. > There once was a configure option in PHP to compile it threadsafe, but > they dropped it for a reason. Because PHP is threadsafe, but a lot of extensions are not. Besides that, using fpm makes it fast enough. On Linux a thread is not much faster that a new process, and uses nearly the same memory, but multiprocessing is much safer than multithreading, and much simpler to code. So I don't think that thread safety is such a big deal. Florian is more interested in the Java abstraction of threading than in the multithreading itself. There are various ways to accomplish something similar, but it is not integrated in the language. For example, you could use gearman to distribute database-intensive tasks on a server, or pcntl_fork to parallelize computation. Bye. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php