Skip to content

Commit

Permalink
Merge pull request #1682 from vasilmkd/null-out-ref
Browse files Browse the repository at this point in the history
Null out reference to last stolen fiber
  • Loading branch information
djspiewak authored Feb 12, 2021
2 parents 6909a54 + e4e7bb8 commit 4b0ad0a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4b0ad0a

Please sign in to comment.