Skip to content

Commit b83ed94

Browse files
committed
fix grammar in all_tasks comments
1 parent 0101742 commit b83ed94

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Lib/asyncio/tasks.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ def all_tasks(loop=None):
4444
"""Return a set of all tasks for the loop."""
4545
if loop is None:
4646
loop = events.get_running_loop()
47-
# capturing the set of eager tasks first, so if an eager task "graduates" to
48-
# a regular task in another thread, we don't risk missing it
47+
# capturing the set of eager tasks first, so if an eager task "graduates"
48+
# to a regular task in another thread, we don't risk missing it.
4949
eager_tasks = list(_eager_tasks)
50-
# Looping over the weak set isn't safe as it can be updated from another thread,
51-
# therefore we cast to lists prior to filtering. The list cast itself requires
52-
# iteration, so we repeat it several times ignoring RuntimeErrors (which are not
53-
# very likely to occur). See issues 34970 and 36607 for details.
50+
# Looping over the WeakSet isn't safe as it can be updated from another
51+
# thread, therefore we cast it to list prior to filtering. The list cast
52+
# itself requires iteration, so we repeat it several times ignoring
53+
# RuntimeErrors (which are not very likely to occur).
54+
# See issues 34970 and 36607 for details.
5455
scheduled_tasks = None
5556
i = 0
5657
while True:

0 commit comments

Comments
 (0)