mirror of
https://github.com/Textualize/rich.git
synced 2025-08-28 14:14:18 +00:00
provide comment as to why Live needs lock in process_renderables
This commit is contained in:
parent
119211e37f
commit
ae15cff503
1 changed files with 2 additions and 1 deletions
|
@ -156,7 +156,8 @@ class Live(JupyterMixin, RenderHook):
|
|||
) -> List[ConsoleRenderable]:
|
||||
"""Process renderables to restore cursor and display progress."""
|
||||
if self.console.is_terminal:
|
||||
with self._lock: # need to ensure data is not updating in between
|
||||
# lock needs acquiring as user can modify live_render renerable at any time unlike in Progress.
|
||||
with self._lock:
|
||||
renderables = [
|
||||
self._live_render.position_cursor(),
|
||||
*renderables,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue