Hi,

On Sat, Jul 16, 2011 at 12:32 AM, VanL <van.lindb...@gmail.com> wrote:
> I think that a better (read: closer term, and more likely to be performant)
> answer is to create multiple interpreters, *each with their own GIL, each in
> their own thread,* and connect them via channels (essentially a pair of
> queues).

That's hand-waving away the real question: what can you pass over
channels?  If the interpreters are supposed to be completely
separated, then you can only pass strings, and the result looks
exactly like separated processes.  You can extend it to pass tuples
and other simple data structures, but that's the same as extending the
cross-process communication protocol.  If on the other hand you can
pass arbitrary random objects, then you have the issue that the
objects are not really owned by one interpreter or the other; I don't
really think it can be made to work in the current model of the object
space reference.  Even if we manage, we'd end up again with the issue
of concurrent changes to shared objects, which is the core problem to
solve in any case --- either in your approach or with STM or with
fine-grained locking.


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to