Channel

ox.channels.Channel
class Channel[T](capacity: Int) extends Source[T] with Sink[T]

Attributes

Graph
Supertypes
trait Sink[T]
trait Source[T]
trait SourceOps[T]
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

override def done(): ClosedOr[Unit]

Completes the channel with a "done" state.

Completes the channel with a "done" state.

Any elements that have been sent can be received. After that, receivers will learn that the channel is done.

No new elements can be sent to this channel. Sending will end with a ChannelClosedException.Done exception.

Attributes

Note:

If a send is ran concurrently with done, it can happen that a receiver first learns that the channel is done, and then it can receive the element that was sent concurrently.

Definition Classes
override def error(reason: Option[Exception]): ClosedOr[Unit]

Attributes

Definition Classes
override def receive(): ClosedOr[T]

Attributes

Definition Classes
final override def send(t: T): ClosedOr[Unit]

Attributes

Definition Classes

Inherited methods

def error(reason: Exception): ClosedOr[Unit]

Attributes

Inherited from:
Sink
def error(): ClosedOr[Unit]

Attributes

Inherited from:
Sink
def foreach(f: T => Unit): Unit

Attributes

Inherited from:
SourceOps
def map[U](f: T => U)(using Ox): Source[U]

Attributes

Inherited from:
SourceOps
def map[U](capacity: Int)(f: T => U)(using Ox): Source[U]

Attributes

Inherited from:
SourceOps
def merge[U >: T](capacity: Int)(other: Source[U])(using Ox): Source[U]

Attributes

Inherited from:
SourceOps
def merge[U >: T](other: Source[U])(using Ox): Source[U]

Attributes

Inherited from:
SourceOps
def toList: List[T]

Attributes

Inherited from:
SourceOps
def transform[U](f: Iterator[T] => Iterator[U])(using Ox): Source[U]

Attributes

Inherited from:
SourceOps
def zip[U](capacity: Int)(other: Source[U])(using Ox): Source[(T, U)]

Attributes

Inherited from:
SourceOps
def zip[U](other: Source[U])(using Ox): Source[(T, U)]

Attributes

Inherited from:
SourceOps