Commit 532c5aa
committed
fix: add timeout to Query.close() to prevent CPU busy-loop
When tasks don't respond to cancellation cleanly, anyio's
_deliver_cancellation() enters a busy-loop pegging CPU at 50-100%.
Set a 5s deadline on the task group's own cancel scope so it times
out instead of spinning indefinitely.
Ref: #3781 parent 876d4db commit 532c5aa
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
617 | 617 | | |
618 | 618 | | |
619 | 619 | | |
620 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
621 | 625 | | |
622 | 626 | | |
623 | 627 | | |
| |||
0 commit comments