Skip to content

Instantly share code, notes, and snippets.

@dwhitney
Created July 6, 2011 15:20
Show Gist options
  • Select an option

  • Save dwhitney/1067492 to your computer and use it in GitHub Desktop.

Select an option

Save dwhitney/1067492 to your computer and use it in GitHub Desktop.
private val map = new java.util.HashMap[String, Account]()
map.put("from", Account("from", 500))
map.put("to", Account("to", 500))
val accountsRef = Ref(map)
val hashMap = atomic{ implicit t => accountsRef() }
crazyThreads(hashMap)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment