Shut down the background thread for replacement.
(self)
| 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 | """ |