summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-02-16 19:57:44 +0000
committerPaul Phillips <paulp@improving.org>2010-02-16 19:57:44 +0000
commitcc698e70af0500d103e60ada46eecca1af8f24b1 (patch)
tree4dd7783d708976856cdfcaa921d2214a3d4b5555 /src/library
parent5e993b77ec12d139f43889a6f8194c8ff804a448 (diff)
downloadscala-cc698e70af0500d103e60ada46eecca1af8f24b1.tar.gz
scala-cc698e70af0500d103e60ada46eecca1af8f24b1.tar.bz2
scala-cc698e70af0500d103e60ada46eecca1af8f24b1.zip
Some prestidigitation improving the repl startu...
Some prestidigitation improving the repl startup time. The prompt is quicker than the eye! No review.
Diffstat (limited to 'src/library')
-rw-r--r--src/library/scala/concurrent/DelayedLazyVal.scala10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/library/scala/concurrent/DelayedLazyVal.scala b/src/library/scala/concurrent/DelayedLazyVal.scala
index 092800cb10..7c5d43e70c 100644
--- a/src/library/scala/concurrent/DelayedLazyVal.scala
+++ b/src/library/scala/concurrent/DelayedLazyVal.scala
@@ -27,9 +27,15 @@ import ops.future
* @version 2.8
*/
class DelayedLazyVal[T](f: () => T, body: => Unit) {
- @volatile private[this] var isDone = false
+ @volatile private[this] var _isDone = false
private[this] lazy val complete = f()
+ /** Whether the computation is complete.
+ *
+ * @return true if the computation is complete.
+ */
+ def isDone = _isDone
+
/** The current result of f(), or the final result if complete.
*
* @return the current value
@@ -38,6 +44,6 @@ class DelayedLazyVal[T](f: () => T, body: => Unit) {
future {
body
- isDone = true
+ _isDone = true
}
}