diff options
author | Martin Odersky <odersky@gmail.com> | 2003-03-10 11:55:36 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2003-03-10 11:55:36 +0000 |
commit | d5da7d9aa5a8d4833775454853e81ead20cc37a7 (patch) | |
tree | d48297de81cb6c84853b94ae02b6edabee5bce5f /sources/examples/futures.scala | |
parent | 1fb5a195b5575e7015be4fd1ee8f89116a78cfb5 (diff) | |
download | scala-d5da7d9aa5a8d4833775454853e81ead20cc37a7.tar.gz scala-d5da7d9aa5a8d4833775454853e81ead20cc37a7.tar.bz2 scala-d5da7d9aa5a8d4833775454853e81ead20cc37a7.zip |
*** empty log message ***
Diffstat (limited to 'sources/examples/futures.scala')
-rw-r--r-- | sources/examples/futures.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sources/examples/futures.scala b/sources/examples/futures.scala new file mode 100644 index 0000000000..1e218351af --- /dev/null +++ b/sources/examples/futures.scala @@ -0,0 +1,12 @@ +package examples; +import concurrent.ops._; +module futures { + def someLengthyComputation = 1; + def anotherLengthyComputation = 2; + def f(x: Int) = x + x; + def g(x: Int) = x * x; + val x = future(someLengthyComputation); + anotherLengthyComputation; + val y = f(x()) + g(x()); + System.out.println(y); +}
\ No newline at end of file |