Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.concurrent/Channel

Channel

scala.concurrent.Channel
classChannel[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

Attributes

Deprecated
[Since version 2.13.0]Use `java.util.concurrent.LinkedTransferQueue` instead.
Source
Channel.scala
Graph
Supertypes
classObject
traitMatchable
classAny

Members list

Value members

Concrete methods

defread: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.

Attributes

Returns

next object dequeued from this channel

Source
Channel.scala
defwrite(x:A):Unit

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

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

Value parameters

x

object to enqueue to this channel

Attributes

Source
Channel.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp