Packages

  • package root
    Definition Classes
    root
  • package zio
    Definition Classes
    root
  • package blocking
    Definition Classes
    zio
  • Blocking
  • package clock
    Definition Classes
    zio
  • package console
    Definition Classes
    zio
  • package duration
    Definition Classes
    zio
  • package internal
    Definition Classes
    zio
  • package random
    Definition Classes
    zio
  • package stm
    Definition Classes
    zio
  • package stream
    Definition Classes
    zio
  • package system
    Definition Classes
    zio
  • package test

    _ZIO Test_ is a featherweight testing library for effectful programs.

    _ZIO Test_ is a featherweight testing library for effectful programs.

    The library imagines every spec as an ordinary immutable value, providing tremendous potential for composition. Thanks to tight integration with ZIO, specs can use resources (including those requiring disposal), have well- defined linear and parallel semantics, and can benefit from a host of ZIO combinators.

    import zio.test._
    import zio.test.environment.Live
    import zio.clock.nanoTime
    import Assertion.isGreaterThan
    
    object MyTest extends DefaultRunnableSpec {
      def spec = suite("clock")(
        testM("time is non-zero") {
          assertM(Live.live(nanoTime))(isGreaterThan(0))
        }
      )
    }
    Definition Classes
    zio
p

zio

blocking

package blocking

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. blocking
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type Blocking = Has[Service]

Value Members

  1. def blocking[R <: Blocking, E, A](zio: ZIO[R, E, A]): ZIO[R, E, A]

    Locks the specified effect to the blocking thread pool.

  2. def blockingExecutor: URIO[Blocking, Executor]

    Retrieves the executor for all blocking tasks.

  3. def effectBlocking[A](effect: => A): RIO[Blocking, A]

    Retrieves the executor for all blocking tasks.

  4. 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 ZIO is interrupted, the blocked thread running the synchronous effect will be interrupted via the cancel effect.

  5. 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.

  6. 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 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.

  7. object Blocking extends Serializable

    The Blocking module 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 Blocking module 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.

Inherited from AnyRef

Inherited from Any

Ungrouped