Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/common/utils/AtomicSharedPtrTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ struct AvailSlots {

std::lock_guard lock(mutex);
if (idx == nextAvail - 1) {
while (free.find(--nextAvail) != free.end()) {
// move back next avail as much as possible
;
--nextAvail;
while (free.find(nextAvail - 1) != free.end()) {
// move back next avail as much as possible
free.erase(--nextAvail);
}
} else {
free.insert(idx);
Expand Down