diff options
author | mihaylov <mihaylov@epfl.ch> | 2004-04-05 10:03:55 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2004-04-05 10:03:55 +0000 |
commit | 784644a91989a7e1183bfa313588d5a602f7388b (patch) | |
tree | 728f251a971a3d037d9a6ae22847f2d7eefa681f /sources | |
parent | a28216b0e1c9f409a4d655c41ff0831ff498e72b (diff) | |
download | scala-784644a91989a7e1183bfa313588d5a602f7388b.tar.gz scala-784644a91989a7e1183bfa313588d5a602f7388b.tar.bz2 scala-784644a91989a7e1183bfa313588d5a602f7388b.zip |
- Synchronized the isSet method to guard agains...
- Synchronized the isSet method to guard against the weak guarantees of
the Java Memory Model
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scala/concurrent/SyncVar.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/scala/concurrent/SyncVar.scala b/sources/scala/concurrent/SyncVar.scala index ec3fd281e2..0e1b9fd38c 100644 --- a/sources/scala/concurrent/SyncVar.scala +++ b/sources/scala/concurrent/SyncVar.scala @@ -26,12 +26,12 @@ class SyncVar[a] { notifyAll() } - def isSet: Boolean = + def isSet: Boolean = synchronized { isDefined; + } def unset = synchronized { isDefined = false } } - |