forked from boostorg/unordered
Update duration of erase operations to trigger successful erasures when only 2 threads are available
This commit is contained in:
@ -147,7 +147,7 @@ namespace {
|
|||||||
enable_exceptions();
|
enable_exceptions();
|
||||||
thread_runner(
|
thread_runner(
|
||||||
values, [&num_erased, &x, threshold](boost::span<T> /* s */) {
|
values, [&num_erased, &x, threshold](boost::span<T> /* s */) {
|
||||||
for (std::size_t i = 0; i < 128; ++i) {
|
for (std::size_t i = 0; i < 256; ++i) {
|
||||||
try {
|
try {
|
||||||
auto count = x.erase_if([threshold](value_type& v) {
|
auto count = x.erase_if([threshold](value_type& v) {
|
||||||
static std::atomic<std::uint32_t> c{0};
|
static std::atomic<std::uint32_t> c{0};
|
||||||
@ -211,7 +211,7 @@ namespace {
|
|||||||
enable_exceptions();
|
enable_exceptions();
|
||||||
thread_runner(
|
thread_runner(
|
||||||
values, [&num_erased, &x, threshold](boost::span<T> /* s */) {
|
values, [&num_erased, &x, threshold](boost::span<T> /* s */) {
|
||||||
for (std::size_t i = 0; i < 128; ++i) {
|
for (std::size_t i = 0; i < 256; ++i) {
|
||||||
try {
|
try {
|
||||||
auto count =
|
auto count =
|
||||||
boost::unordered::erase_if(x, [threshold](value_type& v) {
|
boost::unordered::erase_if(x, [threshold](value_type& v) {
|
||||||
|
Reference in New Issue
Block a user