File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -2,22 +2,15 @@ package utest
2
2
3
3
// Taken from the implementation for JS
4
4
5
- import scala .concurrent .Future
5
+ import scala .concurrent .{Await , Future }
6
+ import concurrent .duration ._
6
7
import scala .scalanative .reflect .Reflect
7
8
8
9
/**
9
10
* Platform specific stuff that differs between JVM, JS and Native
10
11
*/
11
12
object PlatformShims {
12
- def await [T ](f : Future [T ]): T = {
13
- scala.scalanative.runtime.loop()
14
- f.value match {
15
- case Some (v) => v.get
16
- case None => throw new IllegalStateException (
17
- " Test that returns Future must be run asynchronously in Scala Native, see TestTreeSeq::runAsync"
18
- )
19
- }
20
- }
13
+ def await [T ](f : Future [T ]): T = Await .result(f, Duration .Inf )
21
14
22
15
type EnableReflectiveInstantiation =
23
16
scala.scalanative.reflect.annotation.EnableReflectiveInstantiation
You can’t perform that action at this time.
0 commit comments