Andi Gutmans wrote:
> I still think that if you're going to implement such a thread extension 
> it shouldn't try and copy it's parents data-structures. It'd be very 
> slow and prone to errors.

Andi,
Currently only the thread_include function that Alan wrote works.  I 
have idea's for doing the other thing without having to copy stuff, and 
without using mutexes in the engine.

Basicly, the idea is to recompile the file, but rather than start 
execution as normal, call into a function within the file.  This gets us 
a middle ground that makes starting the thread easy, while allowing a 
function to be the target of the thread start function (which I *realy* 
prefere).

I'm also thinking that it might be possible to set up a 'shared' 
interpreter on it's own thread that doesn't run anything, but is just 
used to store zval's for the other threads.  When a thread_set/get is 
called, it actually comunicates with this extra thread to set/get the 
shared vars.

Since you know the engine much better than me ;), what do you think of 
these idea's?

Shane


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to