diff options
Diffstat (limited to 'src/main/scala/scala/async/FutureSystem.scala')
-rw-r--r-- | src/main/scala/scala/async/FutureSystem.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/scala/scala/async/FutureSystem.scala b/src/main/scala/scala/async/FutureSystem.scala index e9373b3..f0b4653 100644 --- a/src/main/scala/scala/async/FutureSystem.scala +++ b/src/main/scala/scala/async/FutureSystem.scala @@ -51,9 +51,12 @@ trait FutureSystem { /** Complete a promise with a value */ def completeProm[A](prom: Expr[Prom[A]], value: Expr[scala.util.Try[A]]): Expr[Unit] + + def spawn(tree: context.Tree): context.Tree = + future(context.Expr[Unit](tree))(execContext).tree } - def mkOps(c: Context): Ops {val context: c.type} + def mkOps(c: Context): Ops { val context: c.type } } object ScalaConcurrentFutureSystem extends FutureSystem { |