[New-bugs-announce] [issue22006] thread module documentation erroneously(?) states not all built-in functions release the GIL

Dan O'Reilly report at bugs.python.org
Fri Jul 18 21:53:27 CEST 2014


New submission from Dan O'Reilly:

Currently, the caveats section of the thread/_thread module has this statement in it:

"Not all built-in functions that may block waiting for I/O allow other threads to run. (The most popular ones (time.sleep(), file.read(), select.select()) work as expected.)"

As far as I know, this isn't the case; all built-in functions that do blocking I/O release the GIL, and therefore do indeed allow other threads to run.

I asked a question about this on stackoverflow recently (http://stackoverflow.com/q/24831458/2073595), and Mark Dickinson helpfully pointed out that this statement was added by Guido way back in 1994, which suggests it's probably just obsolete. If that's the case, the statement should be removed to avoid confusion.

----------
assignee: docs at python
components: Documentation
messages: 223428
nosy: dan.oreilly, docs at python
priority: normal
severity: normal
status: open
title: thread module documentation erroneously(?) states not all built-in functions release the GIL
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22006>
_______________________________________


More information about the New-bugs-announce mailing list