emit

abstract suspend override fun emit(value: T)

Emits a value to this shared flow, suspending on buffer overflow if the shared flow was created with the default BufferOverflow.SUSPEND strategy.

See tryEmit for a non-suspending variant of this function.

This method is thread-safe and can be safely invoked from concurrent coroutines without external synchronization.

Sources

common source
Link copied to clipboard