Re: phpthreads - hints anyone...
| From: | Shane Caraveo | Date: | Wed, 31 Jul 2002 18:01:19 +0000 |
| Subject: | Re: phpthreads - hints anyone... | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86392@lists.php.net to get a copy of this message | ||
Alan Knowles wrote:
Im looking at adding threading to php, (for the cgi/cli stuff).. The story so far: I've created an extension which diverts all zend_execute calls into the extension -> phpthreads_execute. this function is a copy of zend_execute with a few modifications - to copy & restore things like EG(active_symbol_table); - to malloc lock and unlock the execute loop and release on each opcode.Ouch. While it's an interesting way to deal with the issue, I think this will be way too slow, and maintenance will be hard (keeping up with changes in the real zend_execute, and zend engine in general). As in a couple other responses, the way this needs to be implemented has been hashed out, largely based on how the same problem is solved in Perl (there is a remarkable amount of simularity between PHP and Perl at some levels). If you're interested, lets talk. Shane