Service

trait Service extends Serializable
Companion:
object
class Object
trait Matchable
class Any

Value members

Abstract methods

Retrieves the executor for all blocking tasks.

Retrieves the executor for all blocking tasks.

Concrete methods

def blocking[R, E, A](zio: ZIO[R, E, A]): ZIO[R, E, A]

Locks the specified effect to the blocking thread pool.

Locks the specified effect to the blocking thread pool.

def effectBlocking[A](effect: => A): Task[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.

def effectBlockingCancelable[R, A](effect: => A)(cancel: URIO[R, Any]): RIO[R, 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 ZIO is interrupted, the blocked thread running the synchronous effect will be interrupted via the cancel effect.

def effectBlockingIO[A](effect: => A): IO[IOException, A]

Imports a synchronous effect that does blocking IO into a pure value, refining the error type to [[java.io.IOException]].

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): Task[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 ZIO is interrupted, the blocked thread running the synchronous effect will be interrupted via Thread.interrupt.

Note that this adds significant overhead. For performance sensitive applications consider using effectBlocking or effectBlockingCancel.