Skip to content

Commit

Permalink
Remove one more unnecessary atomic op
Browse files Browse the repository at this point in the history
  • Loading branch information
kubo39 committed May 17, 2024
1 parent c2ebe40 commit 8794dcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/sievecache/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module sievecache;

private:

import core.atomic;
import core.atomic : atomicLoad;
import std.exception : enforce;
import std.traits : isEqualityComparable, isSomeFunction, isTypeTuple;

Expand Down Expand Up @@ -213,7 +213,7 @@ struct SieveCache(K, V) if (isEqualityComparable!K && isKeyableType!K)
auto node = *nodePtr;
removeNode(node);
assert(length_ > 0);
length_.atomicOp!("-=")(1);
(cast() length_)--;
return aa_.remove(key);
}
}
Expand Down

0 comments on commit 8794dcd

Please sign in to comment.