Not need, legacy from libuv. The RunLoop keep the main loop running until is explicitly no longer needed.
28 lines
413 B
C++
28 lines
413 B
C++
#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
|