[Kde-pim] Akonadi + multithreading

Patrick Ohly patrick.ohly at gmx.de
Mon Mar 10 10:47:23 GMT 2014


On Fri, 2014-03-07 at 17:55 +0100, Kevin Krammer wrote:
> On Friday, 2014-03-07, 16:40:09, Patrick Ohly wrote:
> > If I move the check into the main thread, will the other Akonadi methods
> > (in particular Job::exec) work in background threads?
> 
> Yes. All thread's have their own default session, i.e. the 
> Akonadi::Sesssion::defaultSession() instance is a "per-thread singleton".

Okay, I'll try it. One other potential pitfall is that the background
thread creates the Akonadi::Collection which then later gets used for
other operations in the main thread. But it sounds like that this
shouldn't be a problem.

> P.S.: great to hear from you again, despite the circumstances. We need to 
> invite you more often to our sprints :)

If you want to hear more from me, join the SyncEvolution mailing
list ;-} There are obviously KDE users of the tool, just not many
(none?) KDE developers involved.

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