gh-91053: Add an optional callback that is invoked whenever a function is modified by mpage · Pull Request #98175 · python/cpython
JIT compilers may need to invalidate compiled code when a function is modified (e.g. if its code object is modified). This adds the ability to set a callback that, when set, is called each time a function is modified.
mpage
changed the title
Add an optional callback that is invoked whenever a function is modified
gh-91053: Add an optional callback that is invoked whenever a function is modified
mpage
marked this pull request as ready for review
A bit is set in the bit vector iff there is a watcher set at the corresponding offset in the watcher array. Only notify watchers if at least one bit is set.
facebook-github-bot pushed a commit to facebookincubator/cinder that referenced this pull request
Summary: Backport function watchers from upstream 3.12 (cf python/cpython#98175, although I backported from latest 3.12 branch, which has had a few modifications.) This diff doesn't use the new API yet; I'll do that in a separate stacked diff. Reviewed By: DinoV Differential Revision: D46993187 fbshipit-source-id: 35f3a0f86f6f0e2764205d4c865e1fb5efb69314
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters