On Tue, Jun 10, 2008 at 9:58 AM, Thomas Heller <[EMAIL PROTECTED]> wrote:
> Martin v. Löwis schrieb:
>> I just finished a PEP 3121 implementation, uploaded at
>>
>> http://codereview.appspot.com/1962
>>
>> It contains all the API changes proposed in the PEP,
>> and updates all modules to conform to a minimal level
>> of the API. I'd like to commit the change later today,
>> so that it still makes the first beta.
>>
>> There is more that can be done about using the API, i.e.
>> changing modules to actually stop keeping global variables,
>> so that proper garbage collection and separation of
>> interpreters becomes possible. I'll look into changing
>> some modules after the beta, but I expect that this will
>> evolve throughout the entire 3.x series. At a minimum,
>> xxmodule will be rewritten to work as a sample of how
>> this is supposed to be used.
>
> So, when all modules are changed to properly support multiple interpreters,
> it may be possible to implement a module combining the benefits of
> both threading and multiprocessing - moving computation to a separate
> interpreter (with its own GIL) without the need to marshal data
> across processes?

You'd still need to marshal across threads, as well as the thread
switch cost, and much of the extra memory of a process (due to
duplicated python modules.)  All you really save is the address space
switching cost, which I doubt anybody has benchmarked.  Multiple
interpreters aren't worth the extra complexity.

-- 
Adam Olsen, aka Rhamphoryncus
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to