summaryrefslogtreecommitdiff
path: root/include/mbgl/util/run_loop.hpp
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2016-01-20 17:27:35 +0200
committerThiago Marcos P. Santos <thiago@mapbox.com>2016-01-20 19:54:20 +0200
commit55c31493aff4f44939087970b1fc4d9a1edbd72c (patch)
tree2855dec8ad4dd1bfb4ca4d28f35694c081b84f12 /include/mbgl/util/run_loop.hpp
parent07f6dee616cda17e020b32a2f0b8caca76aa621d (diff)
downloadqtlocation-mapboxgl-55c31493aff4f44939087970b1fc4d9a1edbd72c.tar.gz
[core] Add ref counting to the main loop
Should not be used at all, added for a corner case on OSX network backend where the request is processed on a worker thread managed by OSX and we need to wait for that reply before destroying the thread that pushed the request.
Diffstat (limited to 'include/mbgl/util/run_loop.hpp')
-rw-r--r--include/mbgl/util/run_loop.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/mbgl/util/run_loop.hpp b/include/mbgl/util/run_loop.hpp
index fef00743f7..e3d9248f84 100644
--- a/include/mbgl/util/run_loop.hpp
+++ b/include/mbgl/util/run_loop.hpp
@@ -41,6 +41,9 @@ public:
void runOnce();
void stop();
+ void ref();
+ void unref();
+
// So far only needed by the libcurl backend.
void addWatch(int fd, Event, std::function<void(int, Event)>&& callback);
void removeWatch(int fd);