Shutting down Bucky
Closed this issue · 3 comments
Shutting down Bucky is currently done with a very blunt axe.
All childs are terminated, which could have some edge cases:
http://docs.python.org/2/library/multiprocessing.html#multiprocessing.Process.terminate
Using the close()
method to stop the run()
main loop should go a long way to make this better.
Not exactly the topic, but related: "Persistating gauge-values does not work (Version 2.2.1)"
The reason is that inside udpserver.py pre_shutdown
is called inside close
. But close is executed in the context of the main-process (the process-object is just a dummy/proxy/or-what-ever).
Moving the try: ... except:
block into the if data==b'EXIT':
block inside the run
method fixes this issue, then it gets executed in the context of the child-process.
Uploaded 2.2.2 release which includes the fix