mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 02:20:14 +08:00
Specify receiver to avoid being confusing
This commit is contained in:
parent
b17c30853c
commit
eaeb242800
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user