[Python-ideas] solving multi-core Python

Eric Snow ericsnowcurrently at gmail.com
Sun Jun 21 02:58:18 CEST 2015

On Sat, Jun 20, 2015 at 6:41 PM, Chris Angelico <rosuav at gmail.com> wrote:
> On Sun, Jun 21, 2015 at 7:42 AM, Eric Snow <ericsnowcurrently at gmail.com> wrote:
>> * disallow forking within subinterpreters
> I love the idea as a whole (if only because the detractors can be told
> "Just use subinterpreters, then you get concurrency"), but this seems
> like a tricky restriction. That means no subprocess.Popen, no shelling
> out to other applications. And I don't know what of other restrictions
> might limit any given program.

This is just something I'm thinking about.  To be honest, forking
probably won't be a problem.  Furthermore, if there were any
restriction it would likely just be on forking Python (a la
multiprocessing).  However, I doubt there will be a need to pursue
such a restriction.  As I said, there are still a lot of open
questions and subtle details to sort out.

> Will it feel like subinterpreters are
> "write your code according to these tight restrictions and it'll
> work", or will it be more of "most programs will run in parallel just
> fine, but there are a few things to be careful of"?

I expect that will be somewhat the case no matter what.  The less
restrictions the better, though. :)  It's a balancing act because I
expect that with some initial restrictions we can land the feature
sooner.  Then we could look into how to relax the restrictions.  I
just want to be careful that we don't paint ourselves into a corner in
that regard.


More information about the Python-ideas mailing list