Skip to content

Commit fbbddbe

Browse files
committed
fix existing race condition
Signed-off-by: Mark Halka <mark.halka2001@gmail.com>
1 parent 51017e7 commit fbbddbe

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

examples/98_just_for_fun/e1_csp_nand_computer.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,12 @@ def my_graph(bits: int = 16):
104104
csp.print("x+y_bits", basket_to_bitstring(add))
105105

106106

107-
def main():
108-
# Show graph with 4-bit ints to limit size
109-
csp.showgraph.show_graph(my_graph, 4)
107+
def main(show_graph: bool = False):
108+
if show_graph:
109+
# Show graph with 4-bit ints to limit size
110+
csp.showgraph.show_graph(my_graph, 4)
110111
csp.run(my_graph, starttime=datetime(2022, 6, 24))
111112

112113

113114
if __name__ == "__main__":
114-
main()
115+
main(show_graph=True)

0 commit comments

Comments
 (0)