Commit 930bba8
authored
Remove risk of getting "coroutine 'Queue.get' was never awaited" warning. (#687)
This could happen when the coroutine object returned from
asyncio.Queue.get() was handed over to a newly created task which was then
immediately cancelled so that the coroutine object was never awaited.
Instead, let the newly created task itself make the call to
asyncio.Queue.get() before immediately awaiting it.
Resolves #646.
Signed-off-by: Knut Aksel Røysland <[email protected]>1 parent 30b529b commit 930bba8
2 files changed
+27
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
| |||
182 | 186 | | |
183 | 187 | | |
184 | 188 | | |
185 | | - | |
186 | | - | |
187 | | - | |
| 189 | + | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
829 | 829 | | |
830 | 830 | | |
831 | 831 | | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
832 | 854 | | |
833 | 855 | | |
834 | 856 | | |
| |||
0 commit comments