> On Aug. 16, 2013, 8:23 a.m., David Faure wrote:
> > "Testing done" is empty. Please make sure you test this, because it could 
> > change the thread in which registered objects get called (I'm not actually 
> > sure how that works with QDBusConnection).
> > 
> > For outgoing calls using KDBusConnectionPool is a very simple change, but 
> > for registering objects for incoming calls, better double-check.
> > 
> > "Ship it" if you tested that the incoming calls happen in the right thread.
> 
> Vishesh Handa wrote:
>     Thanks for the review.
>     
>     I've been testing this for over a week and it's fine as long as all the 
> object registrations are done in the same thread using the same 
> QDBusConnection. Otherwise, we have ugly problems.
>     
>     Right now, this patch cannot be shipped cause the architecture of Nepomuk 
> makes each service automatically register its name and some other properties 
> using QDBusConnection::sessionBus() instead of KDBusConnection (rightly so), 
> and therefore we have a situation where -
>     
>     $ qdbus org.kde.NepomukStorage and $ qdbus 
> org.kde.nepomuk.services.nepomukstorage give different outputs even though 
> both of them belong to the same process.
>     
>     I guess it will be better to only use KDbusConnectionPool everywhere but 
> the main thread.

We could easily make this transparent, i.e. inside KDBusConnectionPool's public 
function, write
  if (main thread)
    return QDBusConnection::sessionBus()
  [current code]

Feel free to make that change if it fixes your problem.
I think it makes a lot of sense anyway, no point in having two dbus connections 
in the main thread.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112011/#review37931
-----------------------------------------------------------


On Aug. 11, 2013, 7:38 a.m., Vishesh Handa wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112011/
> -----------------------------------------------------------
> 
> (Updated Aug. 11, 2013, 7:38 a.m.)
> 
> 
> Review request for Nepomuk and David Faure.
> 
> 
> Description
> -------
> 
>     Use KDBusConnectionPool instead of QDBusConnection
>     
>     QDBusConnection cannot be used across multiple threads
> 
> 
> This addresses bugs 315078 and 319165.
>     http://bugs.kde.org/show_bug.cgi?id=315078
>     http://bugs.kde.org/show_bug.cgi?id=319165
> 
> 
> Diffs
> -----
> 
>   services/storage/backup/backupmanager.cpp 60ce815 
>   services/storage/datamanagementcommand.cpp 5d8036c 
>   services/storage/ontologyloader.cpp 9acac5f 
>   services/storage/query/folderconnection.cpp 1731180 
>   services/storage/query/queryservice.cpp 593abd9 
>   services/storage/repository.cpp 6a2dd18 
>   services/storage/resourcewatcherconnection.cpp 0b245d7 
>   services/storage/resourcewatchermanager.cpp 0b20cb8 
>   services/storage/storage.cpp 1b63dff 
> 
> Diff: http://git.reviewboard.kde.org/r/112011/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Vishesh Handa
> 
>

_______________________________________________
Nepomuk mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/nepomuk

Reply via email to