summaryrefslogtreecommitdiff
path: root/src/mbgl/util/async_task.hpp
blob: 5159e6ce3c7f02937ddbf496e0bd750c5544c5b9 (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
28
#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();
    void unref();

private:
    class Impl;
    std::unique_ptr<Impl> impl;
};

} // namespace util
} // namespace mbgl

#endif