Skip to content

Commit 095491a

Browse files
committed
added comment for RLock
Signed-off-by: Sai Shree Pradhan <saishree.pradhan@databricks.com>
1 parent 7ca12a4 commit 095491a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/databricks/sql/telemetry/telemetry_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ class TelemetryClientFactory:
317317
_executor: Optional[ThreadPoolExecutor] = None
318318
_initialized: bool = False
319319
_lock = threading.RLock() # Thread safety for factory operations
320+
# used RLock instead of Lock to avoid deadlocks when garbage collection is triggered
320321
_original_excepthook = None
321322
_excepthook_installed = False
322323

0 commit comments

Comments
 (0)