25 std::scoped_lock lock (m_waitMutex);
26 if(m_needsupdate.load(std::memory_order_acquire) ==
false)
return;
30 m_map.emplace_back(pair.first, pair.second);
32 std::sort(m_map.begin(), m_map.end());
33 m_needsupdate.store(
false, std::memory_order_release);
37 std::vector<IdentifierHash>
ids;
39 if(m_needsupdate.load(std::memory_order_acquire) ==
true){
41 ids.emplace_back(pair.first);
43 std::sort(
ids.begin(),
ids.end());
45 for(
const auto &pair : m_map){
46 ids.emplace_back(pair.first);
54 if(m_needsupdate.load(std::memory_order_acquire))
wait();
59 if(m_needsupdate.load(std::memory_order_acquire))
wait();
65 if(m_needsupdate.load(std::memory_order_acquire))
wait();
66 return m_map.cbegin();
70 if(m_needsupdate.load(std::memory_order_acquire))
wait();
71 auto itr = std::lower_bound( m_map.cbegin(), m_map.cend(), hashId.value(), [](
const hashPair &lhs,
IdentifierHash::value_type rhs) ->
bool { return lhs.first < rhs; } );
72 if(itr!= m_map.cend() && itr->first==hashId)
return itr;
84 m_needsupdate.store(
false, std::memory_order_release);
89 if(mapptr!=
nullptr)
return false;
91 m_needsupdate.store(
true, std::memory_order_relaxed);
96 auto search = m_fullMap.find(hashId);
104 throw std::runtime_error(
"IDC WARNING Deletion shouldn't occur in addLock paradigm");
106 return StatusCode::SUCCESS;
112 void*
ptr =
const_cast< void*
> (
search->second);
114 m_needsupdate.store(
true, std::memory_order_relaxed);
119 throw std::runtime_error(
"Not implemented in offline mode");
123 throw std::runtime_error(
"Not implemented in offline mode");
127 if(!m_needsupdate.load(std::memory_order_acquire))
for(
const auto&
x : m_map) deleter(
x.second);
129 for(
const auto &pair : m_fullMap) { deleter(pair.second); }