From fea183b3a9f3836c21804f94499440e6abd8f63d Mon Sep 17 00:00:00 2001 From: Masaori Koshiba Date: Fri, 18 Nov 2022 16:42:47 +0900 Subject: [PATCH] Use ts::shared_lock for ReplaceablePtr --- iocore/cache/P_CacheHosting.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iocore/cache/P_CacheHosting.h b/iocore/cache/P_CacheHosting.h index 6fe4887b4e8..0007f3d6945 100644 --- a/iocore/cache/P_CacheHosting.h +++ b/iocore/cache/P_CacheHosting.h @@ -27,6 +27,7 @@ #include "P_Cache.h" #include "tscore/MatcherUtils.h" #include "tscore/HostLookup.h" +#include "tscpp/util/TsSharedMutex.h" #define CACHE_MEM_FREE_TIMEOUT HRTIME_SECONDS(1) @@ -209,7 +210,7 @@ template class ReplaceablePtr ReplaceablePtr &operator=(const ReplaceablePtr &) = delete; std::unique_ptr h = nullptr; - std::shared_mutex m; + ts::shared_mutex m; friend class ReplaceablePtr::ScopedReader; };