Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Jan 16, 2024
1 parent 311d406 commit a608390
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/shared/src/main/scala/cats/effect/IODeferred.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ private final class IODeferred[A] extends Deferred[IO, A] {
val removed = callbacks.clearHandle(handle)
if (!removed) {
val clearCount = clearCounter.incrementAndGet()
if ((clearCount & (clearCount - 1)) == 0) // power of 2
if ((clearCount & (clearCount - 1)) == 0) { // power of 2
clearCounter.addAndGet(-callbacks.pack(clearCount))
()
()
}
}
}

Expand Down

0 comments on commit a608390

Please sign in to comment.