Channel

@deprecated("Use `java.util.concurrent.LinkedTransferQueue` instead.", since = "2.13.0")
class Channel[A]

This class provides a simple FIFO queue of data objects, which are read by one or more reader threads.

Type parameters:
A

type of data exchanged

Deprecated
[Since version 2.13.0]
Source:
Channel.scala
class Object
trait Matchable
class Any

Value members

Concrete methods

def read: A

Retrieve the next waiting object from the FIFO queue, blocking if necessary until an object is available.

Retrieve the next waiting object from the FIFO queue, blocking if necessary until an object is available.

Returns:

next object dequeued from this channel

Source:
Channel.scala
def write(x: A): Unit

Append a value to the FIFO queue to be read by read.

Append a value to the FIFO queue to be read by read. This operation is nonblocking and can be executed by any thread.

Value parameters:
x

object to enqueue to this channel

Source:
Channel.scala