D9028: [UDisks DeviceBackend] Slightly optimize

Stefan BrĂ¼ns noreply at phabricator.kde.org
Tue Apr 24 16:33:19 UTC 2018


bruns added inline comments.

INLINE COMMENTS

> davidedmundson wrote in udisksdevicebackend.cpp:67
> Never trust existing code.
> 
> You're not going to get to process DBus events until we hit the event queue anyway.

Its also clearly racy.

You **have to** connect to the signals before initializing the list of interfaces. Otherwise the following lets you end up in an undefined state:

1. you send introspection query
2. the Daemon sends the respone
3. the Daemon sends an InterfacesAdded
4. you process the introspection response
5. you drop the InterfacesAdded signal
6. you connect the signals

REPOSITORY
  R245 Solid

REVISION DETAIL
  https://phabricator.kde.org/D9028

To: broulik, #frameworks, davidedmundson
Cc: bruns, apol, michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180424/8202a24e/attachment.html>


More information about the Kde-frameworks-devel mailing list