All Downloads are FREE. Search and download functionalities are using the official Maven repository.

orcus.async.AsyncHandler.scala Maven / Gradle / Ivy

There is a newer version: 0.28.9
Show newest version
package orcus.async

trait AsyncHandler[F[_]] {
  import AsyncHandler.Callback

  def handle[A](callback: Callback[A], cancel: => Unit): F[A]
}

object AsyncHandler {
  type Callback[A] = (Either[Throwable, A] => Unit) => Unit

  @inline def apply[F[_]](implicit F: AsyncHandler[F]): AsyncHandler[F] = F
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy