summaryrefslogtreecommitdiff
path: root/src/mbgl/util/uv_detail.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-04-28 14:31:00 -0400
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-04-28 19:26:35 -0400
commit481fa0e69ff8d84202e91a1643c72636200f1b80 (patch)
treea2679fd559046d2c7e6f64cb5c4a67e29e16bf66 /src/mbgl/util/uv_detail.hpp
parent2c3952af66d6907f8a892d42d0034e91126b073a (diff)
downloadqtlocation-mapboxgl-481fa0e69ff8d84202e91a1643c72636200f1b80.tar.gz
Restructure *Request and Context
The previous implementation, based on thread-local storage, did not ensure that the context was destructed before the FileSource run loop. This resulted in implementations attempting to uv_close handles for a loop that had already been destroyed. This change also fixes #1262.
Diffstat (limited to 'src/mbgl/util/uv_detail.hpp')
-rw-r--r--src/mbgl/util/uv_detail.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mbgl/util/uv_detail.hpp b/src/mbgl/util/uv_detail.hpp
index 96d5442462..fbc0ec5aa0 100644
--- a/src/mbgl/util/uv_detail.hpp
+++ b/src/mbgl/util/uv_detail.hpp
@@ -104,6 +104,10 @@ public:
uv_unref(reinterpret_cast<uv_handle_t*>(a.get()));
}
+ inline uv_async_t* get() {
+ return a.get();
+ }
+
private:
#if UV_VERSION_MAJOR == 0 && UV_VERSION_MINOR <= 10
static void async_cb(uv_async_t* a, int) {