This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <lift:surround with="default" at="content"> | |
| <h2>Dynamic Simulation UI - Tree Components...</h2> | |
| <p> | |
| <lift:timestamp.stab> | |
| <span><i>Generated at <b:time/></i></span> | |
| </lift:timestamp.stab> | |
| </p> | |
| </lift:surround> | |
| class timestamp { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import scala.concurrent.stm._ | |
| val x = Ref(0) // allocate a Ref[Int] | |
| val y = Ref.make[String]() // type-specific default | |
| val z = x.single // Ref.View[Int] | |
| atomic { implicit txn => | |
| val i = x() // read | |
| y() = "x was " + i // write | |
| val eq = atomic { implicit txn => // nested atomic |
NewerOlder