2

I was reading about PyPy's stackless feature. My question is simple: does this get around the GIL? The page says it allows coding in "massively concurrent style". Does this also mean massively parallel style, taking advantage of multiple cores?

jmite
  • 8,171
  • 6
  • 40
  • 81

1 Answers1

2

No. The microthreads are more lightweight and convenient to program, but still can't execute in parallel for the same reason a "stackful" Python can't just run threads in parallel. Nothing about the microthreads solves the problems addressed by the GIL, and in fact they're not intended to provide parallelism.

Note that the same is true for the original CPython-based Stackless (see Stackless python and multicores?).

Community
  • 1
  • 1
  • 2
    I should mention that the work on STM *might* also give multicore usage even on some programs written in a pure Stackless style, but that's a "future research" for now. – Armin Rigo Jan 09 '14 at 21:03
  • Is there a multiprogramming module like in CPython? – jmite Jan 09 '14 at 23:56
  • 1
    @jmite You mean `multiprocessing`? PyPy has that, yes. –  Jan 10 '14 at 02:32