On Sat, Aug 27, 2011 at 8:45 PM, Armin Rigo <ar...@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   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to