Force refresh the display of this bar. Parameters ---------- nolock : bool, optional If `True`, does not lock. If [default: `False`]: calls `acquire()` on internal lock. lock_args : tuple, optional Passed to internal loc
(self, nolock=False, lock_args=None)
| 1323 | self._lock.release() |
| 1324 | |
| 1325 | def refresh(self, nolock=False, lock_args=None): |
| 1326 | """ |
| 1327 | Force refresh the display of this bar. |
| 1328 | |
| 1329 | Parameters |
| 1330 | ---------- |
| 1331 | nolock : bool, optional |
| 1332 | If `True`, does not lock. |
| 1333 | If [default: `False`]: calls `acquire()` on internal lock. |
| 1334 | lock_args : tuple, optional |
| 1335 | Passed to internal lock's `acquire()`. |
| 1336 | If specified, will only `display()` if `acquire()` returns `True`. |
| 1337 | """ |
| 1338 | if self.disable: |
| 1339 | return |
| 1340 | |
| 1341 | if not nolock: |
| 1342 | if lock_args: |
| 1343 | if not self._lock.acquire(*lock_args): |
| 1344 | return False |
| 1345 | else: |
| 1346 | self._lock.acquire() |
| 1347 | self.display() |
| 1348 | if not nolock: |
| 1349 | self._lock.release() |
| 1350 | return True |
| 1351 | |
| 1352 | def unpause(self): |
| 1353 | """Restart tqdm timer from last print time.""" |
no test coverage detected