Wait thread lock and replace training items in the background thread.
(self, check_round)
| 1236 | self._replace_done = True |
| 1237 | |
| 1238 | def _try_manage_replacement(self, check_round): |
| 1239 | """ |
| 1240 | Wait thread lock and replace training items in the background thread. |
| 1241 | |
| 1242 | """ |
| 1243 | with self._update_lock: |
| 1244 | if self._round <= 0: |
| 1245 | # shutdown replacement |
| 1246 | self._replace_done = True |
| 1247 | return True, -1 |
| 1248 | |
| 1249 | if self._round != check_round: |
| 1250 | self._compute_replacements() |
| 1251 | return False, self._round |
| 1252 | |
| 1253 | def manage_replacement(self) -> None: |
| 1254 | """ |
no test coverage detected