Yury Selivanov added the comment: > Sure. The issue is that I need to mark certain frames as "protected" from > KeyboardInterrupt, in a way that my signal handler can see when walking the > frame stack, so it can decide whether to raise a KeyboardInterrupt > immediately or to wait until a safer moment.
OK, I got it, thanks! > I suspect the way I'm currently munging frames at runtime also annoys PyPy's > JIT. Yes, whenever you touch frames you're disabling the JIT for the call site (and maybe for more call sites up the stack, idk). So it doesn't matter what you use, `f_func` or `f_locals`, the performance will suffer big time. Is that acceptable for Trio? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12857> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com