summaryrefslogtreecommitdiff
path: root/include/mbgl/util/async_task.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-03-21 15:03:16 +0100
committerKonstantin Käfer <mail@kkaefer.com>2017-03-28 13:53:19 +0200
commit028360b68f3be900b502c885d23bf1b504e613a1 (patch)
treeb76597d6046edabd2597030247c3037bc4205627 /include/mbgl/util/async_task.hpp
parent14bf47c296f7ef80c91366a30b8ec593898e1e9d (diff)
downloadqtlocation-mapboxgl-028360b68f3be900b502c885d23bf1b504e613a1.tar.gz
[node] Move util/async_task.hpp to public include directory
Diffstat (limited to 'include/mbgl/util/async_task.hpp')
-rw-r--r--include/mbgl/util/async_task.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/mbgl/util/async_task.hpp b/include/mbgl/util/async_task.hpp
new file mode 100644
index 0000000000..69746c3eb3
--- /dev/null
+++ b/include/mbgl/util/async_task.hpp
@@ -0,0 +1,24 @@
+#pragma once
+
+#include <mbgl/util/noncopyable.hpp>
+
+#include <memory>
+#include <functional>
+
+namespace mbgl {
+namespace util {
+
+class AsyncTask : private util::noncopyable {
+public:
+ AsyncTask(std::function<void()>&&);
+ ~AsyncTask();
+
+ void send();
+
+private:
+ class Impl;
+ std::unique_ptr<Impl> impl;
+};
+
+} // namespace util
+} // namespace mbgl