From 3f99eb96befdb0398f0b5c46b9a90cea6cbb0161 Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Sun, 1 Nov 2015 21:25:27 -0800 Subject: SI-9545 Correct doc for SyncVar.get(t) It used to have javish semantics, but now is what it is. --- src/library/scala/concurrent/SyncVar.scala | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/library') 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 { -- cgit v1.2.3