Skip to content

Commit

Permalink
Update newsfragments/3108.bugfix.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert authored Oct 26, 2024
1 parent 1e10e62 commit 0cd1feb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions newsfragments/3108.bugfix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ The lack of a call-time wrapper has some other benefits as well:
window in which KeyboardInterrupt could be raised before the protection was
established.

One minor drawback of the new approach is that it is no longer possible to apply
different KI protection rules to different instances of the same closure. See the
One minor drawback of the new approach is that multiple instances of the same
closure share a single KeyboardInterrupt protection state (because they share a
single code object). That means that if you apply
`@enable_ki_protection <trio.lowlevel.enable_ki_protection>` to some of them
and not others, you won't get the protection semantics you asked for. See the
documentation of `@enable_ki_protection <trio.lowlevel.enable_ki_protection>`
for more details and a workaround.

0 comments on commit 0cd1feb

Please sign in to comment.