summaryrefslogtreecommitdiffstats
path: root/dummyresource/resourcefactory.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2015-01-25 11:23:08 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2015-01-25 11:23:08 +0100
commit3fc8ce958fc244e64a3a3a92f3b1440aae04133b (patch)
tree4ba2b3ca3ee6a17e7f3e7ce67d6ca934626cad7a /dummyresource/resourcefactory.cpp
parent9b744da32e64d8a6cd342faba8fc3232884d60f2 (diff)
downloadsink-3fc8ce958fc244e64a3a3a92f3b1440aae04133b.tar.gz
sink-3fc8ce958fc244e64a3a3a92f3b1440aae04133b.zip
A way to ensure all messages have been processed.
As queries become reactive this should become less important. We can then just wait until all results become available. For tests it is in either case useful though.
Diffstat (limited to 'dummyresource/resourcefactory.cpp')
-rw-r--r--dummyresource/resourcefactory.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/dummyresource/resourcefactory.cpp b/dummyresource/resourcefactory.cpp
index 18083cb..f510cd5 100644
--- a/dummyresource/resourcefactory.cpp
+++ b/dummyresource/resourcefactory.cpp
@@ -387,7 +387,14 @@ Async::Job<void> DummyResource::synchronizeWithSource(Akonadi2::Pipeline *pipeli
387 } 387 }
388 } 388 }
389 //TODO find items to remove 389 //TODO find items to remove
390 qDebug() << "sync complete";
391 f.setFinished();
392 });
393}
390 394
395Async::Job<void> DummyResource::processAllMessages()
396{
397 return Async::start<void>([this](Async::Future<void> &f) {
391 //We have to wait for all items to be processed to ensure the synced items are available when a query gets executed. 398 //We have to wait for all items to be processed to ensure the synced items are available when a query gets executed.
392 //TODO: report errors while processing sync? 399 //TODO: report errors while processing sync?
393 if (mSynchronizerQueue.isEmpty()) { 400 if (mSynchronizerQueue.isEmpty()) {