On Fri, May 8, 2020 at 12:30 AM Sebastian Krause <sebast...@realpath.org> wrote:
>
> Guido van Rossum <gu...@python.org> wrote:
> > Is there some kind of optimized communication possible yet between
> > subinterpreters? (Otherwise I still worry that it's no better than
> > subprocesses -- and it could be worse because when one
> > subinterpreter experiences a hard crash or runs out of memory, all
> > others have to die with it.)
>
> The use case that I have in mind with subinterpreters is
> Windows. With its lack of fork() and the way it spawns a fresh
> interpreter process it always feels a bit weird to use
> multiprocessing on Windows. Would it be faster and/or cleaner to
> start a new in-process subinterpreter instead?

Subinterpreters don't support fork() either -- they can't share any
objects, so each one has to start from a blank slate and go through
the Python startup sequence, re-import all modules from scratch, etc.
Subinterpreters do get to skip the OS process spawn overhead, but most
of the startup costs are the same.

-n

-- 
Nathaniel J. Smith -- https://vorpus.org
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/RIK75U3ROEHWZL4VENQSQECB4F4GDELV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to