MCPcopy Index your code
hub / github.com/kernc/backtesting.py / __exit__

Method __exit__

backtesting/_util.py:293–302  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

291 return self
292
293 def __exit__(self, *args, **kwargs):
294 for shm in self._shms:
295 try:
296 shm.close()
297 if shm._create:
298 shm.unlink()
299 except Exception:
300 warnings.warn(f'Failed to unlink shared memory {shm.name!r}',
301 category=ResourceWarning, stacklevel=2)
302 raise
303
304 def arr2shm(self, vals):
305 """Array to shared memory. Returns (shm_name, shape, dtype) used for restore."""

Callers

nothing calls this directly

Calls 2

unlinkMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected