Antoine Pitrou <pit...@free.fr> added the comment:

> Well, those are contrived examples showing the effect of the convoy
> effect induced by those unneeded GIL release/acquire: releasing and
> re-acquiring the GIL comes with a cost (e.g. under Linux, futex are
> really fast in the uncontended case since handled in use space but
> much slower when there's contention), and subverts the OS scheduling
> policy (forcing the thread to drop/re-acquire the GIL make the thread
> block after having consumed a small amount of its time slice and
> increases the context switching rate). I think that releasing and
> re-acquiring the GIL should only be done around potentially blocking
> calls.

Do you want to propose a patch?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11382>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to