Skip to content

Instantly share code, notes, and snippets.

@razie
Created May 30, 2014 17:31
Show Gist options
  • Save razie/45eadaca89b82463923b to your computer and use it in GitHub Desktop.
Save razie/45eadaca89b82463923b to your computer and use it in GitHub Desktop.
testvolatile scala
@volatile var x = 5
(0 to 10 toList).par foreach { t =>
var i:Int = 0; while (i < 100) {
x += 1
i += 1
}
}
x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment