Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

register atexit hook on module _init_ #242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sjkelly
Copy link

@sjkelly sjkelly commented Apr 19, 2024

These hooks are usually registered at module __init__,
partially to make the code easier to reason about. Though
this now has greater significance with improved static
compilation techniques, since the __init__ is the module
entry and anything outside will be discarded from what
I can tell.

These hooks are usually registered at module `_init_`,
partially to make the code easier to reason about. Though
this now has greater significance with improved static
compilation techniques, since the _init_ is the module
entry and anything outside will be discarded from what
I can tell.
@KristofferC
Copy link
Sponsor Member

Yeah that makes sense. The previous behavior feels broken...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants