AsyncBuilder

abstract class AsyncBuilder[CancelationToken]

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 if Unit 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.

Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

def create[A](register: (Scheduler, Callback[Throwable, A]) => CancelationToken): Task[A]