diff --git a/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingQueue.scala b/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingQueue.scala index 3edb561c1e..c5bfb2671f 100644 --- a/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingQueue.scala +++ b/core/jvm/src/main/scala/cats/effect/unsafe/WorkStealingQueue.scala @@ -305,6 +305,7 @@ private final class WorkStealingQueue { // fiber has already been written by `internalStealInto` but the // tail has still not been published. val ret = dst.buffer(retIdx) + dst.buffer(retIdx) = null if (n == 0) { // No need for arithmetic and volatile updates. We are immediately