Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/trio/_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ async def acquire_on_behalf_of(self, borrower: Task | object) -> None:
self._pending_borrowers[task] = borrower
try:
await self._lot.park()
except trio.Cancelled:
self._pending_borrowers.pop(task)
except BaseException:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KI cannot be raised here because we are in a @enable_ki_protection function.

self._pending_borrowers.pop(task, None)
raise
else:
await trio.lowlevel.cancel_shielded_checkpoint()
Expand Down
Loading