From: csabella Date: Thu, 1 Jun 2017 01:53:24 +0000 (-0400) Subject: bpo-27618: Clarify that threading.Lock is a factory function (GH-1307) (GH-1894) X-Git-Tag: v3.6.2rc1~110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9abd0bf68f73b3beb56954e22740f0efcf04bc79;p=python bpo-27618: Clarify that threading.Lock is a factory function (GH-1307) (GH-1894) (cherry picked from commit 56ddfd2eea4d98456a9a99bf2a718f21ee6b2be2) --- diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index 2792dfdce0..cda859fe4c 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -371,8 +371,9 @@ All methods are executed atomically. lock, subsequent attempts to acquire it block, until it is released; any thread may release it. - .. versionchanged:: 3.3 - Changed from a factory function to a class. + Note that ``Lock`` is actually a factory function which returns an instance + of the most efficient version of the concrete Lock class that is supported + by the platform. .. method:: acquire(blocking=True, timeout=-1)