diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-11-07 15:27:40 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-11-07 15:59:54 +0100 |
commit | 10f3c8db6163ebe3196173c1d87e69c1fb6a3a65 (patch) | |
tree | b0043bf3feaea28eef36ed9548fa360213b1fd72 /src/main/scala/scala/async/internal/ScalaConcurrentAsync.scala | |
parent | 6a2b940ac6b7e511270079e1b6278c844a57f5d1 (diff) | |
download | scala-async-10f3c8db6163ebe3196173c1d87e69c1fb6a3a65.tar.gz scala-async-10f3c8db6163ebe3196173c1d87e69c1fb6a3a65.tar.bz2 scala-async-10f3c8db6163ebe3196173c1d87e69c1fb6a3a65.zip |
Minimize the public API
- Remove the CPS fallback version of async. That was not intended
to be part of 1.0.
- Lookup the await method beside the macro, rather than requiring
all calls to go to AsyncBase.await.
- Create a minimal version of Async that just contains await/async
and delegates to the macro implementation in internal._
- Add scaladoc.
Diffstat (limited to 'src/main/scala/scala/async/internal/ScalaConcurrentAsync.scala')
-rw-r--r-- | src/main/scala/scala/async/internal/ScalaConcurrentAsync.scala | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/scala/scala/async/internal/ScalaConcurrentAsync.scala b/src/main/scala/scala/async/internal/ScalaConcurrentAsync.scala new file mode 100644 index 0000000..4e1a0af --- /dev/null +++ b/src/main/scala/scala/async/internal/ScalaConcurrentAsync.scala @@ -0,0 +1,18 @@ +package scala +package async +package internal + +import scala.language.experimental.macros +import scala.reflect.macros.Context +import scala.concurrent.Future + +object ScalaConcurrentAsync extends AsyncBase { + type FS = ScalaConcurrentFutureSystem.type + val futureSystem: FS = ScalaConcurrentFutureSystem + + override def asyncImpl[T: c.WeakTypeTag](c: Context) + (body: c.Expr[T]) + (execContext: c.Expr[futureSystem.ExecContext]): c.Expr[Future[T]] = { + super.asyncImpl[T](c)(body)(execContext) + } +} |