Skip to content

Commit

Permalink
One more conversion to block drain
Browse files Browse the repository at this point in the history
  • Loading branch information
linas committed May 11, 2024
1 parent fb1edb7 commit 0cc199f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions opencog/persist/proxy/WriteBufferProxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ void WriteBufferProxy::postRemoveAtom(AtomSpace* as, const Handle& h,
// might forget, so we do it for them.
if (not _value_queue.is_empty())
{
std::pair<Handle, Handle> pr;
while (_value_queue.try_get(pr))
WriteThruProxy::storeValue(pr.first, pr.second);
size_t bufsz = _value_queue.size();
std::vector<std::pair<Handle, Handle>> vav =
_value_queue.try_get(bufsz);
for (const std::pair<Handle, Handle>& kvp : vav)
WriteThruProxy::storeValue(kvp.first, kvp.second);

WriteThruProxy::barrier();
}
Expand Down

0 comments on commit 0cc199f

Please sign in to comment.