Shane, I was in the Parrot session at OSCON and parrot is going to implement threads in the exact same way. One interp per thread with sharing memory.
- brad --- Shane Caraveo <[EMAIL PROTECTED]> wrote: > 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 > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php