File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -44,13 +44,14 @@ def all_tasks(loop=None):
44
44
"""Return a set of all tasks for the loop."""
45
45
if loop is None :
46
46
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.
49
49
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.
54
55
scheduled_tasks = None
55
56
i = 0
56
57
while True :
You can’t perform that action at this time.
0 commit comments