mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
refactor: Change boost::shared_mutex to std::shared_mutex (#5576)
This change reverts the usage of boost::shared_mutex back to std::shared_mutex. The change was originally introduced as a workaround for a bug in glibc 2.28 and older versions, which could cause threads using std::shared_mutex to stall. This issue primarily affected Ubuntu 18.04 and earlier distributions, which we no longer support.
This commit is contained in:
@@ -226,7 +226,7 @@ class ValidatorList
|
||||
TimeKeeper& timeKeeper_;
|
||||
boost::filesystem::path const dataPath_;
|
||||
beast::Journal const j_;
|
||||
boost::shared_mutex mutable mutex_;
|
||||
std::shared_mutex mutable mutex_;
|
||||
using lock_guard = std::lock_guard<decltype(mutex_)>;
|
||||
using shared_lock = std::shared_lock<decltype(mutex_)>;
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ private:
|
||||
// Node public key of peer.
|
||||
PublicKey const publicKey_;
|
||||
std::string name_;
|
||||
boost::shared_mutex mutable nameMutex_;
|
||||
std::shared_mutex mutable nameMutex_;
|
||||
|
||||
// The indices of the smallest and largest ledgers this peer has available
|
||||
//
|
||||
@@ -214,7 +214,7 @@ private:
|
||||
total_bytes() const;
|
||||
|
||||
private:
|
||||
boost::shared_mutex mutable mutex_;
|
||||
std::shared_mutex mutable mutex_;
|
||||
boost::circular_buffer<std::uint64_t> rollingAvg_{30, 0ull};
|
||||
clock_type::time_point intervalStart_{clock_type::now()};
|
||||
std::uint64_t totalBytes_{0};
|
||||
|
||||
Reference in New Issue
Block a user