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

Fix initialization-order-fiasco of P4CoreLibrary instance #3994

Merged
merged 1 commit into from
May 3, 2023

Conversation

ChrisDodd
Copy link
Contributor

@ChrisDodd ChrisDodd commented Apr 28, 2023

A change from an internal repo that should be in the open source code.

Replaced the usage of static variable P4CoreLibrary::instance by
static method P4CoreLibrary::instance(). This static method returns
the static variable of P4CoreLibrary instance.
Now the core library instance is created in one place irrespective of
the order of its usage across several source files. Thus it prevents
the initialization-order-fiasco for P4CoreLibrary instance.
@ChrisDodd ChrisDodd merged commit 0237f9b into p4lang:main May 3, 2023
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.

3 participants