diff options
author | Som Snytt <som.snytt@gmail.com> | 2015-11-01 21:25:27 -0800 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2015-11-01 21:25:27 -0800 |
commit | 3f99eb96befdb0398f0b5c46b9a90cea6cbb0161 (patch) | |
tree | e40d10df8b208fd9dcb35a0178c1819352eda9c3 /src/library/scala/concurrent | |
parent | 72538aaed4258b2a91920903cbc50033a07982ec (diff) | |
download | scala-3f99eb96befdb0398f0b5c46b9a90cea6cbb0161.tar.gz scala-3f99eb96befdb0398f0b5c46b9a90cea6cbb0161.tar.bz2 scala-3f99eb96befdb0398f0b5c46b9a90cea6cbb0161.zip |
SI-9545 Correct doc for SyncVar.get(t)
It used to have javish semantics, but now is what it is.
Diffstat (limited to 'src/library/scala/concurrent')
-rw-r--r-- | src/library/scala/concurrent/SyncVar.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/library/scala/concurrent/SyncVar.scala b/src/library/scala/concurrent/SyncVar.scala index 1ee27b0f36..5c06e44efa 100644 --- a/src/library/scala/concurrent/SyncVar.scala +++ b/src/library/scala/concurrent/SyncVar.scala @@ -44,11 +44,10 @@ class SyncVar[A] { if (elapsed < 0) 0 else TimeUnit.NANOSECONDS.toMillis(elapsed) } - /** Waits for this SyncVar to become defined at least for - * `timeout` milliseconds (possibly more), and gets its - * value. + /** Wait at least `timeout` milliseconds (possibly more) for this `SyncVar` + * to become defined and then get its value. * - * @param timeout the amount of milliseconds to wait, 0 means forever + * @param timeout time in milliseconds to wait * @return `None` if variable is undefined after `timeout`, `Some(value)` otherwise */ def get(timeout: Long): Option[A] = synchronized { |