ox.channels

package ox.channels

Members list

Concise view

Type members

Classlikes

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
enum ChannelClosedException(reason: Option[Exception]) extends Exception

Attributes

Graph
Supertypes
trait Enum
trait Product
trait Equals
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Known subtypes
case Error
case Done
sealed trait ChannelState

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Closed
object Done.type
class Error
object Open.type

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
trait Sink[-T]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Channel[T]
trait Source[+T] extends SourceOps[T]

Attributes

Companion:
object
Graph
Supertypes
trait SourceOps[T]
class Object
trait Matchable
class Any
Known subtypes
class Channel[T]
object Source extends SourceCompanionOps

Attributes

Companion:
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Source.type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Source.type
trait SourceOps[+T]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Source[T]
class Channel[T]
Self type

Types

type ClosedOr[T] = Either[Closed, T]

Value members

Concrete methods

def select[T1, T2](ch1: Source[T1], ch2: Source[T2]): ClosedOr[T1 | T2]
def select[T](channels: List[Source[T]]): ClosedOr[T]

Receive an element from exactly one of the channels, blocking if necessary. Complexity: sum of the waiting queues of the channels.

Receive an element from exactly one of the channels, blocking if necessary. Complexity: sum of the waiting queues of the channels.

Attributes

def selectNow[T1, T2](ch1: Source[T1], ch2: Source[T2]): ClosedOr[Option[T1 | T2]]
def selectNow[T](chs: List[Source[T]]): ClosedOr[Option[T]]

Receive an element from exactly one of the channels, if such an element is immediately available.

Receive an element from exactly one of the channels, if such an element is immediately available.

Attributes

Extensions

Extensions

extension [T](c: ClosedOr[T])
def orThrow: T