Re: phpthreads - hints anyone...
| From: | Andi Gutmans | Date: | Sun, 04 Aug 2002 18:33:55 +0000 |
| Subject: | Re: phpthreads - hints anyone... | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86509@lists.php.net to get a copy of this message | ||
At 11:16 PM 8/3/2002 -0700, Shane Caraveo wrote:
Andi Gutmans wrote:I think this is voodoo and will be less straightforward to the end-user as you're not going to manage to compile include files and other things. So you're basically saying, you want to try and make it work magically but it might not work very well. I prefer the keep it simple approach where the user specifies a file.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.Hmm I don't quite understand this idea. Why would you need a shared interpreter and not just a shared symbol table? Can you please explain this again? Thanks, Andi