python如何支持并发

原文见A followup on Concurrency within Python

  1. 安全线程,去掉了GIL。Adopt/move forward with a version of CPython based on the work/concepts offered in Adam Olsen's Safe/Without GIL Threading work. Adopt the monitor and deadlock work for all of CPython, but leave the GIL removal as a compile-time option (python3.0 and python3.0-mt binaries).
  2. 新增 pyProcessing, pprocess, or Parallel-Python 模块to the standard library for those who want to use vanilla cpython, and to whom the fork method works. Which module is added should use existing Python semantics, but be powerful enough for advance/distributed usage. Note, I have started work on a PEP to get the pyProcessing module into the stdlib.
  3. Add an Actor - or Actor-Like module to the functools module, in keeping with the concepts of the current implementations. Python's implementation would be obviously leaky. (Note, I am not a functional programmer by any stretch, I like my OOP, suggestions welcome). This could easily take advantage of both the Safe Threading work.
  4. Add a lightweight (not XML) messaging system to couple with the Actor implementation . (no, I have no suggestions here)
  5. 作者没说,我想当然是stackless python