aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphaller <hallerp@gmail.com>2012-11-05 08:38:00 +0100
committerphaller <hallerp@gmail.com>2012-11-05 08:38:00 +0100
commite804afe144a05f6d950b8a758e3b116fa19a3afc (patch)
treec79224fef402ac6b1e8046df9265a791c7ac0757
parent50c542ae61f4347e0a7003b2ba69000c238f4d2f (diff)
downloadscala-async-e804afe144a05f6d950b8a758e3b116fa19a3afc.tar.gz
scala-async-e804afe144a05f6d950b8a758e3b116fa19a3afc.tar.bz2
scala-async-e804afe144a05f6d950b8a758e3b116fa19a3afc.zip
Create future for async body
-rw-r--r--src/async/library/scala/async/Async.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/async/library/scala/async/Async.scala b/src/async/library/scala/async/Async.scala
index 6f44925..9466df5 100644
--- a/src/async/library/scala/async/Async.scala
+++ b/src/async/library/scala/async/Async.scala
@@ -89,11 +89,11 @@ object Async extends AsyncUtils {
reify {
val result = Promise[T]()
var state = 0
-
- c.Expr(Block(
- localVarTrees :+ resumeFunTree,
- Apply(Ident(newTermName("resume")), List()))).splice
-
+ future {
+ c.Expr(Block(
+ localVarTrees :+ resumeFunTree,
+ Apply(Ident(newTermName("resume")), List()))).splice
+ }
result.future
}