abstract class AsyncBase extends AnyRef
A base class for the async
macro. Subclasses must provide:
- Concrete types for a given future system
- Tree manipulations to create and complete the equivalent of Future and Promise
in that system.
- The async
macro declaration itself, and a forwarder for the macro implementation.
(The latter is temporarily needed to workaround bug SI-6650 in the macro system)
The default implementation, scala.async.Async, binds the macro to scala.concurrent._
.
- Self Type
- AsyncBase
- Alphabetic
- By Inheritance
- AsyncBase
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AsyncBase()
Type Members
- abstract type FS <: FutureSystem
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asyncImpl[T](c: Context)(body: reflect.macros.whitebox.Context.Expr[T])(execContext: reflect.macros.whitebox.Context.Expr[FS.ExecContext])(implicit arg0: reflect.macros.whitebox.Context.WeakTypeTag[T]): reflect.macros.whitebox.Context.Expr[FS.Fut[T]]
- def asyncMethod(u: Universe)(asyncMacroSymbol: reflect.api.Universe.Symbol): reflect.api.Universe.Symbol
- Attributes
- protected[scala.async]
- def await[T](awaitable: FS.Fut[T]): T
A call to
await
must be nested in an enclosingasync
block.A call to
await
must be nested in an enclosingasync
block.A call to
await
does not block the current thread, rather it is a delimiter used by the enclosingasync
macro. Code following theawait
call is executed asynchronously, when the argument ofawait
has been completed.- T
the type of that value.
- awaitable
the future from which a value is awaited.
- returns
the value.
- Annotations
- @compileTimeOnly("`await` must be enclosed in an `async` block")
- def awaitMethod(u: Universe)(asyncMacroSymbol: reflect.api.Universe.Symbol): reflect.api.Universe.Symbol
- Attributes
- protected[scala.async]
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def nullOut(u: Universe)(name: reflect.api.Universe.Expr[String], v: reflect.api.Universe.Expr[Any]): reflect.api.Universe.Expr[Unit]
- Attributes
- protected[scala.async]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()