summaryrefslogtreecommitdiff
path: root/include/mbgl/util/async_task.hpp
blob: 09bdab94d7c418f194a6159351540844a016d0b3 (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;
};

}
}

#endif