[Kde-pim] Akonadi + multithreading

Patrick Ohly patrick.ohly at gmx.de
Fri Mar 7 15:40:09 GMT 2014


Hello!

I recently released SyncEvolution 1.4 and shortly afterwards got a bug
report about Akonadi failing when used in a SyncML HTTP server
(https://bugs.freedesktop.org/show_bug.cgi?id=75672).

The symptom is that SyncEvolution reports "Akonadi is not running. It
can be started with 'akonadictl start'" despite Akonadi being up and
running. SyncEvolution prints that when
Akonadi::ServerManager::isRunning() returns false.

Further debugging showed that this occurs only when code using Akonadi
runs in a background thread. This feature was introduced in
SyncEvolution 1.4 to allow the main SyncML code to respond with
intermediate replies while slow, synchronous initialization of local or
remote storage is still going on.

The feature can be turned off, but the real question remains: should
Akonadi::ServerManager::isRunning() work regardless which thread calls
it?

If I move the check into the main thread, will the other Akonadi methods
(in particular Job::exec) work in background threads?

Bye, Patrick


_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list