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
broulik abandoned this revision.
broulik added a comment.
The important stuff (double/triple lookup) was already committed elsewhere
and the rest is just minor coding style stuff
REPOSITORY
R245 Solid
REVISION DETAIL
https://phabricator.kde.org/D9028
To: broulik, #frameworks,
davidedmundson added inline comments.
INLINE COMMENTS
> broulik wrote in udisksdevicebackend.cpp:67
> Similar code in different place had a comment
>
> // Delay connecting to DBus signals to avoid the related time penalty
> // in hot paths such as predicate matching
Never trust existing
broulik added inline comments.
INLINE COMMENTS
> apol wrote in udisksdevicebackend.cpp:67
> What do we gain by delaying dbus connection?
Similar code in different place had a comment
// Delay connecting to DBus signals to avoid the related time penalty
// in hot paths such as predicate
apol added inline comments.
INLINE COMMENTS
> udisksdevicebackend.cpp:67
> if (m_device->isValid()) {
> -QDBusConnection::systemBus().connect(UD2_DBUS_SERVICE, m_udi,
> DBUS_INTERFACE_PROPS, "PropertiesChanged", this,
> -
>
broulik created this revision.
broulik added reviewers: Frameworks, davidedmundson.
Restricted Application added a project: Frameworks.
REVISION SUMMARY
- Avoid double lookup (contains+value)
- Just `delete take()` instead of contains+value+remove+delete
- Delay connecting to DBus change