Skip to content

Commit

Permalink
Intro fast release for mutex
Browse files Browse the repository at this point in the history
  • Loading branch information
Wh1isper committed Sep 14, 2023
1 parent 25a6801 commit 4d795c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions duetector/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ def get_tracking_model(
Returns:
type: a sqlalchemy model for tracking
"""
if tracer in self._tracking_models:
return self._tracking_models[tracer]

with self.mutex:
if tracer in self._tracking_models:
Expand Down

0 comments on commit 4d795c3

Please sign in to comment.