From 7daeec83233c522980d5e477fee82045de57f77d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 12 Jan 2017 11:45:15 +0100 Subject: syncThen is no longer necessary --- common/commandprocessor.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'common/commandprocessor.cpp') diff --git a/common/commandprocessor.cpp b/common/commandprocessor.cpp index 7cd4a5f..87a120b 100644 --- a/common/commandprocessor.cpp +++ b/common/commandprocessor.cpp @@ -169,7 +169,7 @@ void CommandProcessor::process() } mProcessingLock = true; auto job = processPipeline() - .syncThen([this]() { + .then([this]() { mProcessingLock = false; if (messagesToProcessAvailable()) { process(); @@ -193,10 +193,10 @@ KAsync::Job CommandProcessor::processQueuedCommand(const Sink::QueuedCom case Sink::Commands::InspectionCommand: Q_ASSERT(mInspector); return mInspector->processCommand(data, size) - .syncThen([]() { return -1; }); + .then(KAsync::value(-1)); case Sink::Commands::FlushCommand: return flush(data, size) - .syncThen([]() { return -1; }); + .then(KAsync::value(-1)); default: return KAsync::error(-1, "Unhandled command"); } @@ -234,7 +234,7 @@ KAsync::Job CommandProcessor::processQueue(MessageQueue *queue) [this, time](const QByteArray &data) -> KAsync::Job { time->start(); return processQueuedCommand(data) - .syncThen([this, time](qint64 createdRevision) { + .then([this, time](qint64 createdRevision) { SinkTraceCtx(mLogCtx) << "Created revision " << createdRevision << ". Processing took: " << Log::TraceTime(time->elapsed()); }); }) @@ -251,7 +251,7 @@ KAsync::Job CommandProcessor::processQueue(MessageQueue *queue) } }); })) - .syncThen([this](const KAsync::Error &) { mPipeline->commit(); }); + .then([this](const KAsync::Error &) { mPipeline->commit(); }); } KAsync::Job CommandProcessor::processPipeline() @@ -273,7 +273,7 @@ KAsync::Job CommandProcessor::processPipeline() auto queue = it->next(); return processQueue(queue) - .syncThen([this, time, it]() { + .then([this, time, it]() { SinkTraceCtx(mLogCtx) << "Queue processed." << Log::TraceTime(time->elapsed()); if (it->hasNext()) { return KAsync::Continue; -- cgit v1.2.3