package blocking
- Alphabetic
- By Inheritance
- blocking
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- def blocking[R <: Blocking, E, A](zio: ZIO[R, E, A]): ZIO[R, E, A]
Locks the specified effect to the blocking thread pool.
- def blockingExecutor: URIO[Blocking, Executor]
Retrieves the executor for all blocking tasks.
- def effectBlocking[A](effect: => A): RIO[Blocking, A]
Retrieves the executor for all blocking tasks.
- def effectBlockingCancelable[A](effect: => A)(cancel: UIO[Unit]): RIO[Blocking, A]
Imports a synchronous effect that does blocking IO into a pure value, with a custom cancel effect.
Imports a synchronous effect that does blocking IO into a pure value, with a custom cancel effect.
If the returned
ZIOis interrupted, the blocked thread running the synchronous effect will be interrupted via the cancel effect. - def effectBlockingIO[A](effect: => A): ZIO[Blocking, IOException, A]
Imports a synchronous effect that does blocking IO into a pure value, refining the error type to
java.io.IOException. - def effectBlockingInterrupt[A](effect: => A): RIO[Blocking, A]
Imports a synchronous effect that does blocking IO into a pure value.
Imports a synchronous effect that does blocking IO into a pure value.
If the returned
ZIOis interrupted, the blocked thread running the synchronous effect will be interrupted viaThread.interrupt.Note that this adds significant overhead. For performance sensitive applications consider using
effectBlockingoreffectBlockingCancel. - object Blocking extends Serializable
The
Blockingmodule provides access to a thread pool that can be used for performing blocking operations, such as thread sleeps, synchronous socket/file reads, and so forth.The
Blockingmodule provides access to a thread pool that can be used for performing blocking operations, such as thread sleeps, synchronous socket/file reads, and so forth. The contract is that the thread pool will accept unlimited tasks (up to the available memory) and continuously create new threads as necessary.