Skip to content

Commit 950bd2a

Browse files
committed
fix: progress display race condition can result in LiveError
1 parent 0ef9341 commit 950bd2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/halmos/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from enum import Enum
2121
from importlib import metadata
2222

23+
import rich
2324
from rich.status import Status
2425
from z3 import (
2526
Z3_OP_CONCAT,
@@ -753,6 +754,9 @@ def future_callback(future_model):
753754

754755
# display assertion solving progress
755756
if not args.no_status or args.early_exit:
757+
# creating a new live display would fail if the previous one was still active
758+
rich.get_console().clear_live()
759+
756760
with Status("") as status:
757761
while True:
758762
if args.early_exit and len(counterexamples) > 0:

0 commit comments

Comments
 (0)