Skip to content

Commit

Permalink
Don't cover an edge case that doesn't always happen.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed Oct 18, 2024
1 parent 6278f77 commit 89200d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion galsim/phase_screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ def __del__(self):
with acquire_lock(self._objDict['lock'], timeout=3) as acquired:
# If this can't acquire the lock, just timeout and return -- don't hang.
# (This seems to happen occasionally, but apparently only here in __del__.)
if not acquired: return
if not acquired: # pragma: no cover
return

self._objDict['refcount'].value -= 1
# Normally, shareKey is present, but on final cleanup, we have no control over
Expand Down

0 comments on commit 89200d0

Please sign in to comment.