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
Ensure ExternalInputDeviceHub::remove_observer() synchronizes memory across threads #360
Conversation
…ion() are executed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a sensible case of making the function name match its behaviour!
bors r+
Build failed |
Hm, actually, on closer inspection of the surrounding code… I'm not sure that this is the right solution; particularly, it changes the behaviour so that all idle callbacks are always run, and in an unusual context - the GSource destructor will be run during GMainLoop destruction, rather than at That said, I don't see what's wrong with the current bors r- |
…d_execution() are executed"
On closer examination of the logic I agree. Here's a correct solution. |
Although... in the case I'm debugging I thought the update to "removed" ought to be on the same thread. But I have failed to reproduce this failure mode with this change, so maybe the removal hangs before we close the main loop? But surely that would happen more often? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've not been able to get the hang with this either. Code change makes sense to me
bors r+
Build succeeded |
Ensure ExternalInputDeviceHub::remove_observer() synchronizes memory across threads. (Fixes #359)