Dave Mitchell wrote:

On Sat, Jan 03, 2004 at 08:24:06PM -0500, Matt Fowles wrote:


All~

I have a naive question:

Why must each thread have its own interpreter?


I understand that this suggestion will likely be disregarded because of the answer to the above question. But here goes anyway...


Why not have the threads that share everything share interpreters. We can have these threads be within the a single interpreter thus eliminating the need for complicated GC locking and resource sharing complexity. Because all of these threads will be one kernel level thread



Why on earth would they be all one kernel-level thread?




Truth to tell I got the idea from Ruby. As I said it make syncronization easier, because the interpreter can dictate when threads context switch, allowing them to only switch at safe points. There are some tradeoffs to this though. I had forgotten about threads calling into C code. Although the example of regular expressions doesn't work as I think those are supposed to compile to byte code...

Matt

Reply via email to