Factory

object Factory

Constants for the channel factory function Channel().

Properties

BUFFERED
Link copied to clipboard
const val BUFFERED: Int

Requests a buffered channel with the default buffer capacity in the Channel(...) factory function. The default capacity for a channel that suspends on overflow is 64 and can be overridden by setting DEFAULT_BUFFER_PROPERTY_NAME on JVM. For non-suspending channels, a buffer of capacity 1 is used.

CONFLATED
Link copied to clipboard
const val CONFLATED: Int

Requests a conflated channel in the Channel(...) factory function. This is a shortcut to creating a channel with onBufferOverflow = DROP_OLDEST.

DEFAULT_BUFFER_PROPERTY_NAME
Link copied to clipboard
const val DEFAULT_BUFFER_PROPERTY_NAME: String

Name of the property that defines the default channel capacity when BUFFERED is used as parameter in Channel(...) factory function.

RENDEZVOUS
Link copied to clipboard
const val RENDEZVOUS: Int = 0

Requests a rendezvous channel in the Channel(...) factory function — a channel that does not have a buffer.

UNLIMITED
Link copied to clipboard
const val UNLIMITED: Int

Requests a channel with an unlimited capacity buffer in the Channel(...) factory function.

Sources

common source
Link copied to clipboard