MCPcopy
hub / github.com/mne-tools/mne-python / __exit__

Method __exit__

mne/utils/progressbar.py:175–187  ·  view source on GitHub ↗
(self, type_, value, traceback)

Source from the content-addressed store, hash-verified

173 return self
174
175 def __exit__(self, type_, value, traceback): # noqa: D105
176 # Restore exit behavior for our one from the main thread
177 self.update(self._mmap.sum())
178 self._tqdm.close()
179 self._thread._mne_run = False
180 self._thread.join()
181 self._mmap = None
182 if op.isfile(self._mmap_fname):
183 try:
184 os.remove(self._mmap_fname)
185 # happens on Windows sometimes
186 except PermissionError: # pragma: no cover
187 pass
188
189 def __del__(self):
190 """Ensure output completes."""

Callers

nothing calls this directly

Calls 4

updateMethod · 0.95
sumMethod · 0.45
closeMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected