diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-08-14 17:11:40 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-08-14 17:11:40 +0200 |
commit | 9f3a6ff5d27e4983ee626231e43210d2bbb95dd6 (patch) | |
tree | 992cdc5c6d51ae3b430dbcd9fadb30b7ea3d76e1 /common/messagequeue.h | |
parent | 4385c6bae1a66aa94beb703dcc16e12bdf0ebb0e (diff) | |
download | sink-9f3a6ff5d27e4983ee626231e43210d2bbb95dd6.tar.gz sink-9f3a6ff5d27e4983ee626231e43210d2bbb95dd6.zip |
Almost working batch dequeues
Diffstat (limited to 'common/messagequeue.h')
-rw-r--r-- | common/messagequeue.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/messagequeue.h b/common/messagequeue.h index 3393394..c5e32db 100644 --- a/common/messagequeue.h +++ b/common/messagequeue.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <string> | 4 | #include <string> |
5 | #include <functional> | 5 | #include <functional> |
6 | #include <QString> | 6 | #include <QString> |
7 | #include <Async/Async> | ||
7 | #include "storage.h" | 8 | #include "storage.h" |
8 | 9 | ||
9 | /** | 10 | /** |
@@ -32,6 +33,7 @@ public: | |||
32 | //TODO track processing progress to avoid processing the same message with the same preprocessor twice? | 33 | //TODO track processing progress to avoid processing the same message with the same preprocessor twice? |
33 | void dequeue(const std::function<void(void *ptr, int size, std::function<void(bool success)>)> & resultHandler, | 34 | void dequeue(const std::function<void(void *ptr, int size, std::function<void(bool success)>)> & resultHandler, |
34 | const std::function<void(const Error &error)> &errorHandler); | 35 | const std::function<void(const Error &error)> &errorHandler); |
36 | KAsync::Job<void> dequeueBatch(int maxBatchSize, const std::function<void(void *ptr, int size, std::function<void(bool success)>)> & resultHandler); | ||
35 | bool isEmpty(); | 37 | bool isEmpty(); |
36 | signals: | 38 | signals: |
37 | void messageReady(); | 39 | void messageReady(); |