Skip to content

Register plugin's DBus service names before the main name / avoid thread race

David Edmundson requested to merge work/d_ed/race_removal into master

There is a hook to allow service names to be registered before plugins are loaded, but in order to be race-free we need to have this done before KDED is announced as up.

CCBUG: 425315


Avoid race on startup dispatching DBus methods

Since mid-Qt5 DBus is processed on another thread, this will return an
error directly if a path is not registered at the time of handling a
request.

This introduces a lot of new races. We need to have our spy hook
registered early. This is safe to do before KDED::self is created as the
implementation will post an event to the main thread.

I didn't manage to reproduce an issue with this being broken, but I have confirmed things still work fine.

Merge request reports