(self)
| 359 | self._gdn_inputs.clear() |
| 360 | |
| 361 | def close(self): |
| 362 | if self._closed: |
| 363 | return |
| 364 | try: |
| 365 | if self._gdn_cls is not None and self._gdn_cls.__call__ is self._patched_call: |
| 366 | self._gdn_cls.__call__ = self._orig_call |
| 367 | finally: |
| 368 | self._closed = True |
| 369 | self._gdn_cls = None |
| 370 | self._orig_call = None |
| 371 | self._patched_call = None |
| 372 | _GDN_PATCH_LOCK.release() |
| 373 | |
| 374 | def rollback(self, cache, accepted, trim): |
| 375 | n_non_trimmable = sum(1 for c in cache if not c.is_trimmable()) |