File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -315,6 +315,7 @@ def clear_screen():
315315
316316_display_initialized = False
317317_app_started = False
318+ _prev_display_snapshot = None
318319
319320LOG_CAPACITY = 20
320321
@@ -367,8 +368,26 @@ def display_starting():
367368 sys .stdout .flush ()
368369
369370
371+ def _get_display_snapshot ():
372+ thread_states = tuple (
373+ (key , isinstance (thread , threading .Thread ) and thread .is_alive ())
374+ for key , thread in shared_state .THREADS .items ()
375+ )
376+ return (
377+ thread_states ,
378+ shared_state .rtiStatus ,
379+ shared_state .ignStatus .is_set (),
380+ tuple (_log_handler .buffer ),
381+ )
382+
383+
370384def display_thread_states ():
371- global _display_initialized
385+ global _display_initialized , _prev_display_snapshot
386+
387+ snapshot = _get_display_snapshot ()
388+ if _display_initialized and snapshot == _prev_display_snapshot :
389+ return
390+ _prev_display_snapshot = snapshot
372391
373392 lines = [
374393 '' ,
You can’t perform that action at this time.
0 commit comments