[core] Port uv::tls to pthreads

This commit is contained in:
Thiago Marcos P. Santos
2015-11-20 14:30:05 +02:00
parent c5a4377714
commit 62990f0a21
5 changed files with 157 additions and 76 deletions

View File

@@ -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();
}