Skip to content

Commit 51da453

Browse files
mark64jonathanslenders
authored andcommitted
Cancel CPR futures before dropping them
1 parent f3e434e commit 51da453

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

prompt_toolkit/renderer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,8 @@ async def wait_for_timeout() -> None:
554554
await sleep(timeout)
555555

556556
# Got timeout, erase queue.
557+
for response_f in cpr_futures:
558+
response_f.cancel()
557559
self._waiting_for_cpr_futures = deque()
558560

559561
coroutines = [

0 commit comments

Comments
 (0)