hey, i was exploring the visualization flow in drawing_pf.py and noticed that the drawing window directly terminates the full Python process when the window is closed
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
the same also happens when pressing q
if keys[pygame.K_q]:
pygame.quit()
sys.exit()
and since Game.run() is part of the particle filter demo runtime, the drawing layer should ideally only stop its own loop and let the main program decide how to shut down, calling sys.exit() here makes the visualizer control the lifecycle of the whole application
i feel this can become problematic if the particle filter loop, cleanup logic, logging or any future threaded execution is running alongside the ui because closing the Pygame window immediately raises SystemExit instead of returning cleanly
would this be considered intentional for the demo or an oversight in the visualizer lifecycle?
hey, i was exploring the visualization flow in
drawing_pf.pyand noticed that the drawing window directly terminates the full Python process when the window is closedthe same also happens when pressing
qand since
Game.run()is part of the particle filter demo runtime, the drawing layer should ideally only stop its own loop and let the main program decide how to shut down, callingsys.exit()here makes the visualizer control the lifecycle of the whole applicationi feel this can become problematic if the particle filter loop, cleanup logic, logging or any future threaded execution is running alongside the ui because closing the Pygame window immediately raises
SystemExitinstead of returning cleanlywould this be considered intentional for the demo or an oversight in the visualizer lifecycle?