From 8ba8ff25c86a73045ab86238fdefc9486fa3738b Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 15 Jan 2015 23:01:46 +0100 Subject: A null job. --- async/src/async.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'async/src') diff --git a/async/src/async.h b/async/src/async.h index 4fb4f2b..171a245 100644 --- a/async/src/async.h +++ b/async/src/async.h @@ -142,6 +142,19 @@ public: template Job start(ThenTask func); + +/** + * A null job. + * + * An async noop. + * + */ +template +Job null() +{ + return Async::start([](Async::Future &future) {future.setFinished();}); +} + class JobBase { template -- cgit v1.2.3