-
Notifications
You must be signed in to change notification settings - Fork 681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mavproxy.py: Clean up log_writer exit #1496
base: master
Are you sure you want to change the base?
Conversation
queue imports is fine on macos, can you make a to do list like linux with mac |
Added! |
dc3384d
to
049288a
Compare
* Use threading.Event instead of daemon thread to avoid uncaught exception on ctrl+C exit * Daemon threads are not recommended anymore Signed-off-by: Ryan Friedman <[email protected]>
049288a
to
c146c8f
Compare
Can you please test this PR on your mac? |
... lack of disk space should definitely not cause MAVProxy to exit... that would be a serious bug if it did |
This looks good to me. I'll test it this weekend. |
Yes, I will give feeback later |
It's a feature, not a bug:) Lines 1006 to 1013 in b39a31c
Thank you both, much appreciated. |
OK, that's on startup. That's OK. |
exit command still shows unknow in mac |
Yea, exit is broke on master too, not a regression causes by this PR. |
|
The CPU wait is caused by the now hot loop in the log writer exit because it's no longer blocking. In Queue.get(), we're having to deal with The API for the multiproc queue in MAVproxy does not support the same arguments, but if it did, we could set a timeout time, and catch the timeout exception to reduce the loop rate. I could also add a small delay in the loop, which will be easier. |
Purpose
Closes #1414
Details
Queue..get
can block forever. When daemon=False, this means the thread stays hung and mavproxy is never closed unless you sigterm it with a 2nd ctrl+C (nasty)Tests Performed
Linux:
exit
command :MANUAL> Unknown command 'exit'
=> exit doesn't work anymore, even onmaster
MacOS:
exit
commandWindows
exit
command