From 0cd1feb8cd4dc4e5775fb3744c13c6abe16b441e Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 26 Oct 2024 10:58:18 +0100 Subject: [PATCH] Update newsfragments/3108.bugfix.rst --- newsfragments/3108.bugfix.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/newsfragments/3108.bugfix.rst b/newsfragments/3108.bugfix.rst index ec6d94c7f..22cc5223d 100644 --- a/newsfragments/3108.bugfix.rst +++ b/newsfragments/3108.bugfix.rst @@ -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 ` to some of them +and not others, you won't get the protection semantics you asked for. See the documentation of `@enable_ki_protection ` for more details and a workaround.