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

Explicit Crystal.once_init method #15371

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

Conversation

ysbaddaden
Copy link
Contributor

@ysbaddaden ysbaddaden commented Jan 24, 2025

Adds Crystal.once_init that allows to remove the Crystal.once_mutex= setter.

It also removes the need for the __crystal_once_init fun that won't be defined anymore —it's only kept for the legacy implementation. This is one less compiler dependency on runtime.

Follow up to #15369

Prefer a def explictly called by `Crystal.init_runtime` over the
implicit `__crystal_once_init` fun injected by the compiler.

The fun is no longer defined for new compiler builds, however it's still
defined to support older compiler releases.
@ysbaddaden ysbaddaden force-pushed the refactor/explicit-crystal-once-init branch from ab1c6e3 to ffd6b86 Compare January 27, 2025 14:02
@ysbaddaden ysbaddaden marked this pull request as ready for review January 27, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant