Issue #23456: Add missing @coroutine decorators in asyncio
diff --git a/Lib/asyncio/locks.py b/Lib/asyncio/locks.py
index b943e9d..41a68c6 100644
--- a/Lib/asyncio/locks.py
+++ b/Lib/asyncio/locks.py
@@ -162,6 +162,7 @@
# always raises; that's how the with-statement works.
pass
+ @coroutine
def __iter__(self):
# This is not a coroutine. It is meant to enable the idiom:
#
@@ -362,6 +363,7 @@
def __exit__(self, *args):
pass
+ @coroutine
def __iter__(self):
# See comment in Lock.__iter__().
yield from self.acquire()
@@ -446,6 +448,7 @@
def __exit__(self, *args):
pass
+ @coroutine
def __iter__(self):
# See comment in Lock.__iter__().
yield from self.acquire()