Threaded PHP scripts

From: Date: Mon, 20 May 2002 06:14:03 +0000
Subject: Threaded PHP scripts
Groups: php.dev 
Request: Send a blank email to php-dev+get-84183@lists.php.net to get a copy of this message
Hi, I've just started implementing a pthread extension to the PHP language. Things just aren't as simple as I expected. I have no problems in creating threads, mutexes and the like. But it seems that zend_execute and companion functions use some global variables (executor globals, accessed via EG, etc.) that are naturally shared with all threads that I create. This obviously causes serious problems. My question is: how does the zend engine internally handle threading? I know there is some kind of mutex mechanism because Apache uses multiple threads instead of processed to handle client requests. Without documentation, it is very hard to figure out how things are done. If I was able to use the same threading mechanism within a script, the extension would be more portable, too (afaik, pthreads work only on unices...) All comments are welcome. -Topi- << http://ee.oulu.fi/~topiolli >>

« previous php.dev (#84183) next »