New submission from Philip Semanchuk <osvens...@users.sourceforge.net>:
The language in the threading API documentation is a little inconsistent. The section I'm talking about is here: http://docs.python.org/c-api/init.html#thread-state-and-the-global-interpreter-lock The GIL is variously referred to as "global lock", "interpreter lock", "global interpreter lock", "GIL", and simply "the lock". Given the infamy of the GIL, one might expect all of these to be equally clear. But as someone coding to this API for the first time, I had plenty to learn already and the need to ensure that all of these referred to the same singleton was distracting. This documentation begins, "The Python interpreter is not fully thread safe. In order to support multi-threaded Python programs, there's a global lock that must be held by the current thread before it can safely access Python objects. Without the lock..." My suggestion is to alter the second sentence to the following: "Without this lock (called the global interpreter lock, or GIL for short)...." All subsequent documentation references to "interpreter lock", "global interpreter lock", and "lock" should be changed to "GIL". It would be nice if the API referred to it consistently (e.g. PyEval_AcquireLock() versus PyGILState_Ensure()) but that would require an interface change which is obviously out of the question. ---------- assignee: georg.brandl components: Documentation messages: 82365 nosy: georg.brandl, osvenskan severity: normal status: open title: Inconsistency in C-API thread docs versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5298> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com