mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
only half of hw threads
This commit is contained in:
@@ -253,12 +253,11 @@ public:
|
||||
partitioned_unordered_map(
|
||||
std::optional<std::size_t> partitions = std::nullopt)
|
||||
{
|
||||
// Set partitions to the number of hardware threads if the parameter
|
||||
// is either empty or set to 0.
|
||||
partitions_ = std::size_t{std::thread::hardware_concurrency() / 2};
|
||||
// partitions && *partitions
|
||||
// ? *partitions
|
||||
// : std::thread::hardware_concurrency();
|
||||
// Set partitions to use half of the number of hardware threads if the
|
||||
// parameter is either empty or set to 0.
|
||||
partitions_ = partitions && *partitions
|
||||
? *partitions
|
||||
: std::size_t{std::thread::hardware_concurrency() / 2};
|
||||
map_.resize(partitions_);
|
||||
XRPL_ASSERT(
|
||||
partitions_,
|
||||
|
||||
Reference in New Issue
Block a user