allan.conda
03/16/2022, 9:23 AMcoroutineScope {
var count = 0
val mutableList = mutableListOf<Int>()
launch {
while(isActive) {
mutableList.add(count++)
delay(1000)
}
}
launch {
while(isActive) {
delay(10000)
mutableList.take(10).also(mutableList::removeAll)
}
}
}gildor
03/16/2022, 10:03 AMgildor
03/16/2022, 10:04 AMgildor
03/16/2022, 10:05 AMallan.conda
03/16/2022, 10:11 AMpoll() and send() (poll is deprecated though)Zach Klippenstein (he/him) [MOD]
03/16/2022, 3:09 PMgildor
03/18/2022, 4:04 PM