aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala/scala/async/FutureSystem.scala
Commit message (Collapse)AuthorAgeFilesLines
* Enable generalized state machinestopic/wip-futuresystem-extensionPhilipp Haller2013-05-231-5/+33
| | | | | | | - async { } block can now generate a subclass of an existing trait - future system can directly return the state machine instance from async, without spawning an actual future - adds iterator-based async implementation with future system
* Abstract over type of generated state machinePhilipp Haller2013-04-261-0/+3
| | | | Removes method `TransformUtils.applied`.
* Abstract from Try in onComplete of FutureSystem#OpsPhilipp Haller2013-04-261-1/+8
| | | | | Adds `Result[A]` type member to `FutureSystem` and `def resultType[A]` to `FutureSystem#Ops`.
* Refactor TryBasedFutureSystemPhilipp Haller2013-04-261-32/+19
|
* Abstract from Try's get and isFailure methodsPhilipp Haller2013-04-261-18/+49
| | | | | | | | | Adds the following methods to `FutureSystem#Ops`: def isFailedResult(name: TermName): Expr[Boolean] def resultValue(name: TermName, resultType: Type): Tree Introduces `TryBasedFutureSystem` trait.
* Split FutureSystem's completeProm extension point into 3 partsPhilipp Haller2013-04-261-5/+39
| | | | | | | | | | | | | This replaces the single, `Try`-dependent `completeProm` method with: def completeProm[A: WeakTypeTag]( prom: Expr[Prom[A]], value: Expr[A]): Expr[Unit] def completePromWithExceptionTopLevel[A: WeakTypeTag]( prom: Expr[Prom[A]], exception: Expr[Throwable]): Expr[Unit] def completePromWithFailedResult[A: WeakTypeTag]( prom: Expr[Prom[A]], resultName: TermName): Expr[Unit]
* Remove CPS dependency from default async implementationPhilipp Haller2013-04-121-0/+8
| | | | | | - move all CPS-related code to `continuations` sub package - fix CPS-based async implementation - enable testing of CPS-based async implementation
* New fix for #1861: Add fall-back to CPS for all unsupported uses of awaitphaller2012-12-191-1/+4
| | | | | | | This is a re-implementation of a previous fix. It is more modular, since it enables the definition of a CPS-based fall-back as a subclass of `AsyncBase`. Thus, it's possible to define fall-back-enabled subclasses of `AsyncBase` targetting not only Scala Futures.
* Rewrite the state machine to a class, rather than an object.Jason Zaugg2012-11-261-0/+9
| | | | | | | | | | | | To avoid suprises in tree retyping, the instance of this class is immediately upcase to StateMachine[Promise[T], ExecContext]. Allow nested non-case classes. These pop up when we use nested async calls. Only look for duplicate names in the subtrees traversed by AsyncTraverser.
* add missing copyrightJason Zaugg2012-11-241-1/+1
|
* Fix typosphaller2012-11-121-2/+2
|
* Resolve feature warningsphaller2012-11-121-1/+3
|
* Remove unneed ().Jason Zaugg2012-11-091-5/+2
|
* Abstract over the future implementation.Jason Zaugg2012-11-091-0/+138
- Refactor the base macro implementation to be parameterized by a FutureSystem, which is defines the triple of types (Future, Promise, ExecutionContext) and the operations on those types (at the AST level) - Cleanup generation of ASTs, in particular, use reify more widely.