threading.py -> winthreading.c : Some results

Tim Peters tim.one at home.com
Thu Jan 3 00:16:48 EST 2002


[Paul Rubin]
> Is it feasible to replace the GIL with something else, that allows
> Python programs to use the parallelism on multi-cpu systems?

Python does use it:  if you restrict yourself to one process, Python helps
out by letting other programs use all the other CPUs <wink>.

You can search the archives for "free threading" for many prior discussions
of this.  Bottom line:  Greg Stein did this once when it was easier than it
would be now; it worked; it was a major effort; and it slowed single-thread
Python programs by about a factor of 2 (due to dynamic mountains of new
finer-grained internal synch gimmicks needed to preserve enough atomicity to
keep semantics sane).





More information about the Python-list mailing list