summaryrefslogtreecommitdiff
path: root/include/mbgl/util
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2014-12-03 17:02:38 -0800
committerJohn Firebaugh <john.firebaugh@gmail.com>2014-12-03 17:38:10 -0800
commit57249ca32c7b0684be36f5195d4967e6517fe75b (patch)
tree9315b1cd1fa25fe0eee1b09c651a6a1cf433ad39 /include/mbgl/util
parent10ebcbca93327e098a48d88869b6d8a2a19df6da (diff)
downloadqtlocation-mapboxgl-57249ca32c7b0684be36f5195d4967e6517fe75b.tar.gz
Prefer stdlib to libuv (fixes #688)
Diffstat (limited to 'include/mbgl/util')
-rw-r--r--include/mbgl/util/uv.hpp1
-rw-r--r--include/mbgl/util/uv_detail.hpp48
2 files changed, 0 insertions, 49 deletions
diff --git a/include/mbgl/util/uv.hpp b/include/mbgl/util/uv.hpp
index 2fc3e0dc30..74ed9c87a8 100644
--- a/include/mbgl/util/uv.hpp
+++ b/include/mbgl/util/uv.hpp
@@ -12,7 +12,6 @@ namespace uv {
std::string cwd();
-class thread;
class rwlock;
class loop;
class async;
diff --git a/include/mbgl/util/uv_detail.hpp b/include/mbgl/util/uv_detail.hpp
index b6b9be208d..99f5edc145 100644
--- a/include/mbgl/util/uv_detail.hpp
+++ b/include/mbgl/util/uv_detail.hpp
@@ -20,30 +20,6 @@ void close(std::unique_ptr<T> ptr) {
});
}
-class thread : public mbgl::util::noncopyable {
-public:
- inline thread(std::function<void ()> fn_)
- : fn(fn_) {
- if (uv_thread_create(&t, thread_cb, this) != 0) {
- throw std::runtime_error("failed to initialize thread");
- }
- }
-
- void join() {
- if (uv_thread_join(&t) != 0) {
- throw std::runtime_error("failed to join thred");
- }
- }
-
-private:
- static void thread_cb(void* data) {
- reinterpret_cast<thread*>(data)->fn();
- }
-
- uv_thread_t t;
- std::function<void ()> fn;
-};
-
class loop : public mbgl::util::noncopyable {
public:
inline loop() {
@@ -109,30 +85,6 @@ private:
std::function<void ()> fn;
};
-class mutex : public mbgl::util::noncopyable {
-public:
- inline mutex() {
- if (uv_mutex_init(&mtx) != 0) {
- throw std::runtime_error("failed to initialize mutex");
- }
- }
- inline ~mutex() { uv_mutex_destroy(&mtx); }
- inline void lock() { uv_mutex_lock(&mtx); }
- inline void unlock() { uv_mutex_unlock(&mtx); }
-
-private:
- uv_mutex_t mtx;
-};
-
-class lock : public mbgl::util::noncopyable {
-public:
- lock(mutex &mtx_) : mtx(mtx_) { mtx.lock(); }
- ~lock() { mtx.unlock(); }
-
-private:
- mutex &mtx;
-};
-
class rwlock : public mbgl::util::noncopyable {
public:
inline rwlock() {