On Sat, Aug 27, 2011 at 8:45 PM, Armin Rigo <arigo at tunes.org> wrote: > Hi all, > > About multithreading models: I recently made an observation which > might be obvious to some, but not to me, and as far as I know not to > most of us either. I think that it's worth being pointed out :-) > > http://mail.python.org/pipermail/pypy-dev/2011-August/008153.html Having a context manager to say "don't release the GIL" for a bit could actually be really nice (e.g. for implementing builtin-style method semantics for data types written in Python). However, two immediate questions come to mind: 1. How does the patch interact with C code that explicitly releases the GIL? (e.g. IO commands inside a "with atomic:" block) 2. Whether or not Jython and IronPython could implement something like that, since they're free threaded with fine-grained locks. If they can't then I don't see how we could justify making it part of the standard library. Interesting idea, though :) Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4