From 83a81d6b1df3d738a76f875911e6461ce3b3af80 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Thu, 1 Feb 2024 20:04:00 +0100 Subject: [PATCH] relaxed epoch bumping --- .../unordered/detail/foa/concurrent_table.hpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/include/boost/unordered/detail/foa/concurrent_table.hpp b/include/boost/unordered/detail/foa/concurrent_table.hpp index ab023fc0..4d0f9a78 100644 --- a/include/boost/unordered/detail/foa/concurrent_table.hpp +++ b/include/boost/unordered/detail/foa/concurrent_table.hpp @@ -572,7 +572,7 @@ public: } std::cout - <<"version: 2024/01/29 13:10; " + <<"version: 2024/02/02 20:00; " <<"lf: "<<(double)size()/capacity()<<"; " <<"capacity: "<=ce-1&& + auto ce=current_epoch.load(std::memory_order_relaxed); + if(everybody_reached_epoch(ce)&& current_epoch.compare_exchange_strong(ce,ce+1)){ v.epoch=ce+1; }