final class Blocker extends AnyVal
An execution context that is safe to use for blocking operations.
Used in conjunction with ContextShift, this type allows us to write functions
that require a special ExecutionContext
for evaluation, while discouraging the
use of a shared, general purpose pool (e.g. the global context).
Instances of this class should *NOT* be passed implicitly because they hold state and in some cases your application may need different instances of Blocker.
- Source
- Blocker.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Blocker
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def blockOn[F[_], A](fa: F[A])(implicit cs: ContextShift[F]): F[A]
Evaluates the supplied task on the blocking execution context via
blockOn
. - def blockOnK[F[_]](implicit cs: ContextShift[F]): ~>[F, F]
blockOn
as a natural transformation. - val blockingContext: ExecutionContext
- def delay[F[_], A](thunk: => A)(implicit F: Sync[F], cs: ContextShift[F]): F[A]
Like
Sync#delay
but the supplied thunk is evaluated on the blocking execution context. - def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def toString(): String
- Definition Classes
- Any
This is the API documentation for the cats-effect library.
See the cats.effect package for a quick overview.
Links
Canonical documentation links:
Related Cats links (the core):