abstract
class
AsyncBuilder[CancelationToken] extends AnyRef
Instance Constructors
-
new
AsyncBuilder()
Abstract Value Members
-
abstract
def
create[A](register: (Scheduler, Callback[Throwable, A]) ⇒ CancelationToken): Task[A]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
The
AsyncBuilder
is a type used by the Task.create builder, in order to change its behavior based on the type of the cancelation token.In combination with the Partially-Applied Type technique, this ends up providing a polymorphic Task.create that can support multiple cancelation tokens optimally, i.e. without implicit conversions and that can be optimized depending on the
CancelToken
used - for example ifUnit
is returned, then the yielded task will not be cancelable and the internal implementation will not have to worry about managing it, thus increasing performance.