Packages

  • package root
    Definition Classes
    root
  • package fs2
    Definition Classes
    root
  • package async

    Provides utilities for asynchronous computations.

    Provides utilities for asynchronous computations.

    Definition Classes
    fs2
  • package immutable

    Provides types which allow asynchronous reading (but not writing).

  • package mutable

    Provides types which allow asynchronous reading and writing.

  • package util

    Type classes and other utilities used by fs2.

    Type classes and other utilities used by fs2.

    Type Classes

    This package includes a minimal set of common functional type classes -- e.g., Functor, Applicative, Monad, Traverse -- along with some extensions that are more specialized like Suspendable, Catchable, Effect, and Async.

    Infix syntax is provided for all of these type classes by the fs2.util.syntax object, which is used by adding import fs2.util.syntax._. The infix syntax has no runtime cost. The type classes generally do not define many derived methods (with the exception of Async). Instead, derived methods are defined soley infix. For example, Monad does not define flatten but monad infix syntax does.

    Note that these type classes are intentionally minimal. Providing a general purpose set of functional structures is not a goal of FS2.

    Definition Classes
    fs2
p

fs2

async

package async

Provides utilities for asynchronous computations.

Source
async.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. async
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def boundedQueue[F[_], A](maxSize: Int)(implicit arg0: Async[F]): F[Queue[F, A]]

    Creates a bounded asynchronous queue.

    Creates a bounded asynchronous queue. Calls to enqueue1 will wait until the queue's size is less than maxSize. See mutable.Queue for more documentation.

  2. def circularBuffer[F[_], A](maxSize: Int)(implicit F: Async[F]): F[Queue[F, A]]

    Creates a queue that functions as a circular buffer.

    Creates a queue that functions as a circular buffer. Up to size elements of type A will accumulate on the queue and then it will begin overwriting the oldest elements. Thus an enqueue process will never wait.

  3. def hold[F[_], A](initial: A, source: Stream[F, A])(implicit arg0: Async[F]): Stream[F, Signal[F, A]]

    Converts a discrete stream to a signal.

    Converts a discrete stream to a signal. Returns a single-element stream.

    Resulting signal is initially initial, and is updated with latest value produced by source. If source is empty, the resulting signal will always be initial.

    source

    discrete stream publishing values to this signal

  4. def holdOption[F[_], A](source: Stream[F, A])(implicit arg0: Async[F]): Stream[F, Signal[F, Option[A]]]

    Defined as hold(None, source.map(Some(_)))

  5. def semaphore[F[_]](initialCount: Long)(implicit arg0: Async[F]): F[Semaphore[F]]

    Creates a mutable.Semaphore, initialized to the given count.

  6. def signalOf[F[_], A](initialValue: A)(implicit arg0: Async[F]): F[Signal[F, A]]

    Creates a new continuous signal which may be controlled asynchronously, and immediately sets the value to initialValue.

  7. def synchronousQueue[F[_], A](implicit F: Async[F]): F[Queue[F, A]]

    Creates a synchronous queue, which always has size 0.

    Creates a synchronous queue, which always has size 0. Any calls to enqueue1 block until there is an offsetting call to dequeue1. Any calls to dequeue1 block until there is an offsetting call to enqueue1.

  8. def topic[F[_], A](initial: A)(implicit arg0: Async[F]): F[Topic[F, A]]

    Creates an asynchronous topic, which distributes each published A to an arbitrary number of subscribers.

    Creates an asynchronous topic, which distributes each published A to an arbitrary number of subscribers. Each subscriber is guaranteed to receive at least the initial A or last value published by any publisher.

  9. def unboundedQueue[F[_], A](implicit arg0: Async[F]): F[Queue[F, A]]

    Creates an unbounded asynchronous queue.

    Creates an unbounded asynchronous queue. See mutable.Queue for more documentation.

Inherited from AnyRef

Inherited from Any

Ungrouped