From 4d795c3edde963180aff2d5440960e6451d5852b Mon Sep 17 00:00:00 2001 From: wunder957 Date: Thu, 14 Sep 2023 23:26:16 +0800 Subject: [PATCH] Intro fast release for mutex --- duetector/db.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/duetector/db.py b/duetector/db.py index 2fb9fdc..5cd4bd9 100644 --- a/duetector/db.py +++ b/duetector/db.py @@ -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: