L
Size: a a a
L
A
val channel = BroadcastChannel<String>(Channel.BUFFERED)val channel = BroadcastChannel<String>(Channel.CONFLATED)A
AN
val channel = BroadcastChannel<String>(Channel.BUFFERED)val channel = BroadcastChannel<String>(Channel.CONFLATED)МR
class Bus<T> {
private val channel: BroadcastChannel<T> = BroadcastChannel(1)
fun content(): Flow<T> {
return channel.openSubscription().receiveAsFlow()
}
fun setValue(value: T) {
channel.offer(value)
}
}AN
class Bus<T> {
private val channel: BroadcastChannel<T> = BroadcastChannel(1)
fun content(): Flow<T> {
return channel.openSubscription().receiveAsFlow()
}
fun setValue(value: T) {
channel.offer(value)
}
}AN
МR
AN
AN
МR
val channel = BroadcastChannel<String>(1)
channel.send("0")
scope.launch {
channel.openSubscription()
.receiveAsFlow()
.collect { println("receive $it") }
}
scope.launch {
channel.openSubscription()
.receiveAsFlow()
.collect { println("receive $it") }
}
L
class Bus<T> {
private val channel: BroadcastChannel<T> = BroadcastChannel(1)
fun content(): Flow<T> {
return channel.openSubscription().receiveAsFlow()
}
fun setValue(value: T) {
channel.offer(value)
}
}L
AN
val channel = BroadcastChannel<String>(1)
channel.send("0")
scope.launch {
channel.openSubscription()
.receiveAsFlow()
.collect { println("receive $it") }
}
scope.launch {
channel.openSubscription()
.receiveAsFlow()
.collect { println("receive $it") }
}
L
AN
val channel = BroadcastChannel<String>(1)
channel.send("0")
scope.launch {
channel.openSubscription()
.receiveAsFlow()
.collect { println("receive $it") }
}
scope.launch {
channel.openSubscription()
.receiveAsFlow()
.collect { println("receive $it") }
}
AN
МR
AH

AH
ex as E жалуется на unchecked cast