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

Added shutdown handler #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SabatinoMasala
Copy link

Added a shutdown handler to catch more errors (like compile-time parse errors).

@stracker-phil
Copy link
Owner

Good addition, thanks for your contribution!

Just note that the init function is called very often, e.g. a thousand times per request. register_shutdown_function will add new shutdown handlers (instead of replacing old ones), so the process_shutdown function will be called a thousand times on every request.

Better register the shutdown function inside the constructor, which is called only once.

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.

2 participants