Skip to content

Commit

Permalink
fix (Core): ensures that DictCache cleanup function is always called
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed Jun 7, 2024
1 parent afcfaae commit 2c066bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/DIRAC/Core/Utilities/DictCache.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
"""
DictCache.
"""

import datetime
import threading
import atexit

# DIRAC
from DIRAC.Core.Utilities.LockRing import LockRing
Expand Down Expand Up @@ -63,6 +65,7 @@ def __init__(self, deleteFunction=False, threadLocal=False):

# Function to clean the elements
self.__deleteFunction = deleteFunction
atexit.register(self.__del__)

@property
def lock(self):
Expand Down

0 comments on commit 2c066bb

Please sign in to comment.