summaryrefslogtreecommitdiff
path: root/src/mbgl/util/async_task.hpp
blob: ce273c664cc4000c6f1de6a65c2dfe5248253ff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef MBGL_UTIL_ASYNC_TASK
#define MBGL_UTIL_ASYNC_TASK

#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

#endif