MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / shutdown

Method shutdown

monai/data/dataset.py:1205–1217  ·  view source on GitHub ↗

Shut down the background thread for replacement.

(self)

Source from the content-addressed store, hash-verified

1203 return False
1204
1205 def shutdown(self):
1206 """
1207 Shut down the background thread for replacement.
1208
1209 """
1210 if not self.is_started():
1211 return
1212
1213 # wait until replace mgr is done the current round
1214 while not self._try_shutdown():
1215 time.sleep(0.01)
1216 if self._replace_mgr is not None:
1217 self._replace_mgr.join(300)
1218
1219 def _replace_cache_thread(self, index: int):
1220 """

Callers 5

set_dataMethod · 0.95
test_shapeMethod · 0.95
test_shuffleMethod · 0.95
test_set_dataMethod · 0.95
completedMethod · 0.80

Calls 2

is_startedMethod · 0.95
_try_shutdownMethod · 0.95

Tested by 3

test_shapeMethod · 0.76
test_shuffleMethod · 0.76
test_set_dataMethod · 0.76