diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-11-09 17:10:02 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-12-01 00:00:09 +0200 |
commit | 1d623322044c4650bb39c9224f596341a23f490f (patch) | |
tree | e9bf800c1e04aec08c4eb4b6b4ead4b7843f0199 /include | |
parent | 6762cd0ca90aaafa81eab3a638fee1d1eb391b74 (diff) | |
download | qtlocation-mapboxgl-1d623322044c4650bb39c9224f596341a23f490f.tar.gz |
[core] Use AsyncTask on the MapContext
Diffstat (limited to 'include')
-rw-r--r-- | include/mbgl/util/async_task.hpp | 28 |
1 files changed, 28 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..09bdab94d7 --- /dev/null +++ b/include/mbgl/util/async_task.hpp @@ -0,0 +1,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 |