Commit eaeb2428 authored by Him188's avatar Him188

Specify receiver to avoid being confusing

parent b17c3085
...@@ -173,7 +173,7 @@ inline fun <reified E : Event> CoroutineScope.incoming( ...@@ -173,7 +173,7 @@ inline fun <reified E : Event> CoroutineScope.incoming(
capacity: Int = Channel.UNLIMITED capacity: Int = Channel.UNLIMITED
): ReceiveChannel<E> { ): ReceiveChannel<E> {
return Channel<E>(capacity).apply { return Channel<E>(capacity).apply {
val listener = subscribeAlways<E>(coroutineContext) { val listener = this@incoming.subscribeAlways<E>(coroutineContext) {
send(this) send(this)
} }
this.invokeOnClose { this.invokeOnClose {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment