(self)
| 98 | self._lock.release() |
| 99 | |
| 100 | def clear(self) -> None: |
| 101 | if not self._lock.acquire(blocking=True, timeout=LOCK_TIMEOUT): |
| 102 | raise Exception("DataCache.clear" + ERR_LOCK_FAILED) |
| 103 | try: |
| 104 | self._base.clear() |
| 105 | finally: |
| 106 | self._lock.release() |
| 107 | |
| 108 | def delete(self, key: Hashable) -> bool: |
| 109 | if not self._lock.acquire(blocking=True, timeout=LOCK_TIMEOUT): |