[Python-Dev] Software Transactional Memory for Python (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Sat Aug 27 14:40:35 CEST 2011
- Previous message: [Python-Dev] Software Transactional Memory for Python
- Next message: [Python-Dev] Software Transactional Memory for Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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:
- How does the patch interact with C code that explicitly releases the GIL? (e.g. IO commands inside a "with atomic:" block)
- 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
- Previous message: [Python-Dev] Software Transactional Memory for Python
- Next message: [Python-Dev] Software Transactional Memory for Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]