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

Issue 614: Module & Finalizer: the module finalizer #709

Merged
merged 5 commits into from
Oct 1, 2024

Conversation

timspainNERSC
Copy link
Collaborator

@timspainNERSC timspainNERSC commented Oct 1, 2024

Module & Finalizer: the module finalizer

Fixes #614 (partially)


Change Description

  • Adds the Finalize class, which mimics std::atexit(), but can be called before the end of main().
  • Adds the Finalizer.cpp source file to the CMake system.
  • Adds a test of the Finalizer class.
  • Adds a Module::finalize<> function template.
  • Adds the instantiation of the above function template to the module generation file.
  • Add registration of finalization for a module wherever the module implementation if configured.
    • By calling registerUnique() each module instantiation is only called once when the finalization occurs.

Test Description

There is a test for the new Finalizer class.

@timspainNERSC timspainNERSC self-assigned this Oct 1, 2024
@timspainNERSC timspainNERSC changed the title Issue614 modulefinalizer Module & Finalizer: the module finalizer Oct 1, 2024
@timspainNERSC timspainNERSC marked this pull request as ready for review October 1, 2024 12:51
@timspainNERSC timspainNERSC merged commit 3aa8037 into issue614_datalifetimes Oct 1, 2024
@timspainNERSC timspainNERSC changed the title Module & Finalizer: the module finalizer Issue 614: Module & Finalizer: the module finalizer Oct 1, 2024
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.

1 participant