promise that signals and async results come directly from the mainloop
Submitted by Allison (desrt)
Assigned to David Zeuthen
Link to original bug (#647999)
Description
It would be nice if GDBus had specific documentation that stated:
-
async ready callbacks are always dispatched directly from the mainloop
-
same for signal handlers
and not, for example, some other entry point into GDBus.
I am currently defining an abstract interface and I want to ensure that no method calls will ever cause the model to emit change signals on itself. Method calls interact with GDBus, however and some of my implementations emit change signals in response to incoming GDBus signals and method call returns.
It is not currently the case, but one could imagine that for some odd reason in the future you want to process incoming messages from the queue in response to other calls. One could imagine an even more complex situation whereby you support some method to inject messages into GDBus to be dispatched directly and this interface gets called from some other code that gets called by an implementor of my interface who thinks that it is "safe".
I know that none of these weird cases will ever occur if GDBus offers, as a matter of API guarantee, a statement to the effect of "GDBus will only ever make calls to GDBusSignalCallback and GAsyncReadyCallback functions directly from its own fresh GMainLoop dispatch, and never directly from other API calls".