Skip to content

Commit

Permalink
add a storeFence before the builder publishes result
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeskells committed Mar 22, 2020
1 parent 5ff7f9a commit 5c6c6b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/library/scala/collection/immutable/HashSet.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1279,8 +1279,9 @@ object HashSet extends ImmutableSetFactory[HashSet] {
}

override def result(): HashSet[A] = {
rootNode = nullToEmpty(makeImmutable(rootNode))
rootNode
rootNode = nullToEmpty(makeImmutable(rootNode))
VM.releaseFence()
rootNode
}


Expand Down

0 comments on commit 5c6c6b2

Please sign in to comment.