File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
library/src/scala/concurrent Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ trait Awaitable[+T] {
60
60
* @throws TimeoutException if after waiting for the specified time this `Awaitable` is still not ready
61
61
* @throws IllegalArgumentException if `atMost` is [[scala.concurrent.duration.Duration.Undefined Duration.Undefined ]]
62
62
*/
63
- @ throws(classOf [Exception ])
63
+ @ throws(classOf [TimeoutException ])
64
+ @ throws(classOf [InterruptedException ])
64
65
def result (atMost : Duration )(implicit permit : CanAwait ): T
65
66
}
66
67
Original file line number Diff line number Diff line change @@ -578,7 +578,8 @@ object Future {
578
578
throw new TimeoutException (s " Future timed out after [ $atMost] " )
579
579
}
580
580
581
- @ throws(classOf [Exception ])
581
+ @ throws(classOf [TimeoutException ])
582
+ @ throws(classOf [InterruptedException ])
582
583
override def result (atMost : Duration )(implicit permit : CanAwait ): Nothing = {
583
584
ready(atMost)
584
585
throw new TimeoutException (s " Future timed out after [ $atMost] " )
Original file line number Diff line number Diff line change @@ -214,7 +214,8 @@ package concurrent {
214
214
* @throws TimeoutException if after waiting for the specified time `awaitable` is still not ready
215
215
* @throws IllegalArgumentException if `atMost` is [[scala.concurrent.duration.Duration.Undefined Duration.Undefined ]]
216
216
*/
217
- @ throws(classOf [Exception ])
217
+ @ throws(classOf [TimeoutException ])
218
+ @ throws(classOf [InterruptedException ])
218
219
def result [T ](awaitable : Awaitable [T ], atMost : Duration ): T =
219
220
blocking(awaitable.result(atMost)(AwaitPermission ))
220
221
}
You can’t perform that action at this time.
0 commit comments