diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-11-20 14:30:05 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-12-01 11:49:02 +0200 |
commit | 62990f0a21eab309f03db0d92119a9a299ae475d (patch) | |
tree | bf282a7b8728a4eeec6a4d60f62c48e1bccc47be /platform | |
parent | c5a437771470382718500ba5cea598ede364b240 (diff) | |
download | qtlocation-mapboxgl-62990f0a21eab309f03db0d92119a9a299ae475d.tar.gz |
[core] Port uv::tls to pthreads
Diffstat (limited to 'platform')
-rw-r--r-- | platform/default/run_loop.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/platform/default/run_loop.cpp b/platform/default/run_loop.cpp index a0262364ca..845ee1b2ab 100644 --- a/platform/default/run_loop.cpp +++ b/platform/default/run_loop.cpp @@ -1,12 +1,18 @@ #include <mbgl/util/run_loop.hpp> #include <mbgl/util/async_task.hpp> #include <mbgl/util/uv.hpp> +#include <mbgl/util/thread_local.hpp> + +namespace { + +using namespace mbgl::util; +static ThreadLocal<RunLoop>& current = *new ThreadLocal<RunLoop>; + +} namespace mbgl { namespace util { -static uv::tls<RunLoop> current; - RunLoop* RunLoop::Get() { return current.get(); } |