@volatile in Scala does not guarantee the visibility of shared variables in Future

后端 未结 0 1665
无人及你
无人及你 2020-12-11 08:27

As we all know, volatile guarantees visibility of shared variables in Java, but I didn\'t get the results I wanted in Scala. The result of the following example is always un

相关标签:
回答
  • 消灭零回复
提交回复
热议问题