AsyncBuilder

abstract class AsyncBuilder[CancelationToken]

The AsyncBuilder is a type used by the IO.create builder, in order to change its behavior based on the type of the cancelation token.

The AsyncBuilder is a type used by the IO.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 IO.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[E, A](register: (Scheduler, BiCallback[E, A]) => CancelationToken): IO[E, A]