Merge pull request #39928 from tg-at-google:patch-6
PiperOrigin-RevId: 314327088 Change-Id: Iea043ffc87db4417e18dddb78fae9c10731cc230
This commit is contained in:
commit
4f0fc47dd2
@ -365,7 +365,8 @@ bool LogEveryNState::ShouldLog(int n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool LogFirstNState::ShouldLog(int n) {
|
bool LogFirstNState::ShouldLog(int n) {
|
||||||
const uint32 counter_value = counter_.load(std::memory_order_relaxed);
|
const int counter_value =
|
||||||
|
static_cast<int>(counter_.load(std::memory_order_relaxed));
|
||||||
if (counter_value < n) {
|
if (counter_value < n) {
|
||||||
counter_.store(counter_value + 1, std::memory_order_relaxed);
|
counter_.store(counter_value + 1, std::memory_order_relaxed);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user