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

DM-42317: Make Singleton threadsafe #179

Merged
merged 1 commit into from Jan 18, 2024
Merged

DM-42317: Make Singleton threadsafe #179

merged 1 commit into from Jan 18, 2024

Conversation

dhirving
Copy link
Contributor

@dhirving dhirving commented Jan 10, 2024

Previously, if there were multiple threads concurrently calling a constructor for a Singleton class, you could end up instantiating more than one instance of the class. daf_butler classes using this metaclass are used in a multi-threaded context.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@dhirving dhirving changed the title Make Singleton threadsafe DM-42317: Make Singleton threadsafe Jan 10, 2024
Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1e4d8a3) 93.98% compared to head (63c0402) 93.98%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #179   +/-   ##
=======================================
  Coverage   93.98%   93.98%           
=======================================
  Files          46       46           
  Lines        3206     3209    +3     
=======================================
+ Hits         3013     3016    +3     
  Misses        193      193           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Previously, if there were multiple threads concurrently calling a constructor for a Singleton class, you could end up instantiating more than one instance of the class.  daf_butler classes using this metaclass are used in a multi-threaded context.
@dhirving dhirving marked this pull request as ready for review January 12, 2024 17:32
@dhirving dhirving merged commit 68ffd96 into main Jan 18, 2024
16 checks passed
@dhirving dhirving deleted the tickets/DM-42317 branch January 18, 2024 16:32
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