From: Andrew M. Kuchling Date: Sat, 10 May 2008 17:48:45 +0000 (+0000) Subject: #1625509: describe behaviour of import lock X-Git-Tag: v2.6b1~529 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ff7fc49c6ac474545e942348aed90e7730d514e;p=python #1625509: describe behaviour of import lock --- diff --git a/Doc/library/imp.rst b/Doc/library/imp.rst index a0e5870820..a40c5e558d 100644 --- a/Doc/library/imp.rst +++ b/Doc/library/imp.rst @@ -114,10 +114,16 @@ This module provides an interface to the mechanisms used to implement the .. function:: acquire_lock() - Acquires the interpreter's import lock for the current thread. This lock should + Acquire the interpreter's import lock for the current thread. This lock should be used by import hooks to ensure thread-safety when importing modules. On platforms without threads, this function does nothing. + Once a thread has acquired the import lock, the same thread may acquire it + again without blocking; the thread must release it once for each time it has + acquired it. + + On platforms without threads, this function does nothing. + .. versionadded:: 2.3