Specify receiver to avoid being confusing

This commit is contained in:
Him188 2020-03-06 10:21:01 +08:00
parent b17c30853c
commit eaeb242800

View File

@ -173,7 +173,7 @@ inline fun <reified E : Event> CoroutineScope.incoming(
capacity: Int = Channel.UNLIMITED
): ReceiveChannel<E> {
return Channel<E>(capacity).apply {
val listener = subscribeAlways<E>(coroutineContext) {
val listener = this@incoming.subscribeAlways<E>(coroutineContext) {
send(this)
}
this.invokeOnClose {