SendProducerScope

interface SendProducerScope<T> : ProducerScope<T>

Properties

Link copied to clipboard
abstract val channel: SendChannel<T>
Link copied to clipboard
Link copied to clipboard
@DelicateCoroutinesApi
abstract val isClosedForSend: Boolean
Link copied to clipboard
abstract val onSend: SelectClause2<T, SendChannel<T>>

Functions

Link copied to clipboard
suspend fun <T> ProducerScope<T>.awaitSend(block: suspend SendProducerScope<T>.() -> Unit)
Link copied to clipboard
fun CoroutineScope.buildCompletable(): Completable

fun CoroutineScope.buildCompletable(action: CompletableBuilder.() -> Unit): Completable

Builds a completable that can be completed, executing all deferred actions in reverse order of their registration.

Link copied to clipboard
fun CoroutineScope.childJobScope(context: CoroutineContext = EmptyCoroutineContext): CoroutineScope

Creates a new CoroutineScope with a Job that is a child of the current scope's job. This allows for launching coroutines that are cancelled when the parent scope is cancelled.

Link copied to clipboard
fun CoroutineScope.childSupervisorJobScope(context: CoroutineContext = EmptyCoroutineContext): CoroutineScope

Creates a new CoroutineScope with a SupervisorJob that is a child of the current scope's job. This allows for launching coroutines that can fail independently of the parent scope.

Link copied to clipboard
abstract fun close(cause: Throwable?): Boolean
Link copied to clipboard
abstract fun invokeOnClose(handler: (cause: Throwable?) -> Unit)
Link copied to clipboard
fun CoroutineScope.invokeOnCompletion(block: (cause: Throwable?) -> Unit): DisposableHandle
Link copied to clipboard
open fun offer(element: T): Boolean
Link copied to clipboard
abstract fun onClose(block: () -> Unit)
Link copied to clipboard
abstract suspend fun send(element: T)
Link copied to clipboard
abstract fun sendAsync(value: T): Deferred<T>
Link copied to clipboard
abstract fun sendAsyncLatest(value: T)
Link copied to clipboard
abstract fun trySend(element: T): ChannelResult<Unit>