asChannel
fun asChannel(capacity: Int = Channel.RENDEZVOUS, coroutineContext: CoroutineContext = EmptyCoroutineContext, concurrency: ConcurrencyKind = CONCURRENT, priority: EventPriority = EventPriority.NORMAL): Channel<out BaseEvent>
Deprecated (with error)
Please use forwardToChannel instead.
Replace with
import kotlinx.coroutines.channels.Channel
Content copied to clipboard
Channel<BaseEvent>(capacity).apply { forwardToChannel(this, coroutineContext, priority) }
Content copied to clipboard
创建事件监听并将监听结果发送在 Channel. 将返回值 关闭Channel.close 时将会同时关闭事件监听.
已弃用
请使用 forwardToChannel 替代.
Parameters
capacity
Channel 容量. 详见 Channel 构造.
See also
Channel