Em Sex, 2010-05-14 às 18:13 +0100, nigelsande...@btconnect.com escreveu: > The point I(we)'ve been trying to make is that once you have a reentrant > interpreter, and the ability to spawn one in an OS thread, > all the other bits can be built on top. But unless you have that ability, > whilst the others can be constructed, the cannot make > use of SMP. Eg. They cannot scale.
Okay, this is an important point... Having a reentrant interpreter is a given already, The form I tried to implement that in SMOP was by using CPS. The idea of using green threads is just to enforce serialized access to some data in order to avoid locking (locking with the amount of polymorphism required by Perl 6 is too expensive), and then the regular threads wouldn't share data between them. Of course we could try to have the data structures thread-safe, I didn't try to go that path since I was trying to get Perl 5 interoperability and therefore used refcount garbage collector. The other possibility would be to use processor affinity to force different threads to spawn in the same processor and that way ensure serialized access to the non-thread-safe data. daniel