mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-04 19:25:51 +00:00
Compare commits
4 Commits
Bronek/ext
...
vlntb/numb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c80a59364 | ||
|
|
393dd1e27d | ||
|
|
c1713b8773 | ||
|
|
c6c20ca671 |
@@ -253,11 +253,12 @@ public:
|
|||||||
partitioned_unordered_map(
|
partitioned_unordered_map(
|
||||||
std::optional<std::size_t> partitions = std::nullopt)
|
std::optional<std::size_t> partitions = std::nullopt)
|
||||||
{
|
{
|
||||||
// Set partitions to the number of hardware threads if the parameter
|
// Set partitions to use half of the number of hardware threads if the
|
||||||
// is either empty or set to 0.
|
// parameter is either empty or set to 0.
|
||||||
partitions_ = partitions && *partitions
|
partitions_ = std::size_t{std::thread::hardware_concurrency()};
|
||||||
? *partitions
|
// partitions && *partitions
|
||||||
: std::thread::hardware_concurrency();
|
// ? *partitions
|
||||||
|
// : std::size_t{std::thread::hardware_concurrency() / 2};
|
||||||
map_.resize(partitions_);
|
map_.resize(partitions_);
|
||||||
XRPL_ASSERT(
|
XRPL_ASSERT(
|
||||||
partitions_,
|
partitions_,
|
||||||
|
|||||||
Reference in New Issue
Block a user