File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1369,6 +1369,12 @@ object -- see :ref:`multiprocessing-managers`.
1369
1369
A solitary difference from its close analog exists: its ``acquire `` method's
1370
1370
first argument is named *block *, as is consistent with :meth: `Lock.acquire `.
1371
1371
1372
+ .. method :: locked()
1373
+
1374
+ Return a boolean indicating whether this object is locked right now.
1375
+
1376
+ .. versionadded :: 3.14
1377
+
1372
1378
.. note ::
1373
1379
On macOS, this is indistinguishable from :class: `Semaphore ` because
1374
1380
``sem_getvalue() `` is not implemented on that platform.
@@ -1521,6 +1527,12 @@ object -- see :ref:`multiprocessing-managers`.
1521
1527
A solitary difference from its close analog exists: its ``acquire `` method's
1522
1528
first argument is named *block *, as is consistent with :meth: `Lock.acquire `.
1523
1529
1530
+ .. method :: locked()
1531
+
1532
+ Return a boolean indicating whether this object is locked right now.
1533
+
1534
+ .. versionadded :: 3.14
1535
+
1524
1536
.. note ::
1525
1537
1526
1538
On macOS, ``sem_timedwait `` is unsupported, so calling ``acquire() `` with
You can’t perform that action at this time.
0 commit comments