From efd66f07ddd1319640e7b1f735b62eaa553c19a8 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 5 Oct 2017 13:55:05 +0200 Subject: [PATCH] now working with libuv v1.15.0 --- CMakeLists.txt | 2 +- cmake/in/libuv.in | 4 ++-- src/uvw/thread.hpp | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e7a3c7c..8389556d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ endif() # Project configuration # -project(uvw VERSION 1.2.0) +project(uvw VERSION 1.3.0) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) diff --git a/cmake/in/libuv.in b/cmake/in/libuv.in index 780f39dd..b4d8a6cb 100644 --- a/cmake/in/libuv.in +++ b/cmake/in/libuv.in @@ -7,7 +7,7 @@ if(WIN32) ExternalProject_Add( libuv GIT_REPOSITORY https://github.com/libuv/libuv.git - GIT_TAG v1.14.1 + GIT_TAG v1.15.0 DOWNLOAD_DIR ${LIBUV_DEPS_DIR} TMP_DIR ${LIBUV_DEPS_DIR}/tmp STAMP_DIR ${LIBUV_DEPS_DIR}/stamp @@ -22,7 +22,7 @@ else(WIN32) ExternalProject_Add( libuv GIT_REPOSITORY https://github.com/libuv/libuv.git - GIT_TAG v1.14.1 + GIT_TAG v1.15.0 DOWNLOAD_DIR ${LIBUV_DEPS_DIR} TMP_DIR ${LIBUV_DEPS_DIR}/tmp STAMP_DIR ${LIBUV_DEPS_DIR}/stamp diff --git a/src/uvw/thread.hpp b/src/uvw/thread.hpp index 7223a5e8..743301ec 100644 --- a/src/uvw/thread.hpp +++ b/src/uvw/thread.hpp @@ -113,10 +113,14 @@ class Mutex final: public UnderlyingType { friend class Condition; public: - explicit Mutex(ConstructorAccess ca, std::shared_ptr ref) noexcept + explicit Mutex(ConstructorAccess ca, std::shared_ptr ref, bool recursive = false) noexcept : UnderlyingType{ca, std::move(ref)} { - uv_mutex_init(get()); + if(recursive) { + uv_mutex_init_recursive(get()); + } else { + uv_mutex_init(get()); + } } ~Mutex() noexcept {