I have some existing Android code that uses ticker from kotlinx.coroutines.channels. It doesn't app...
t
I have some existing Android code that uses ticker from kotlinx.coroutines.channels. It doesn't appear to be available for use in commonMain with KMM since it is declared in kotlinx-coroutines-core-jvm. Is there a way for me to use that in commonMain or is there an alternative?
t
I saw that it is marked obsolete. Is there an alternative? The logic uses it to batch up a flow that has a lot of messages being sent.
e
the future of ticker will be flow-based https://github.com/Kotlin/kotlinx.coroutines/issues/540
there is discussion around what that could look like in https://github.com/Kotlin/kotlinx.coroutines/issues/1302
but for now you need to implement your own
t
Yeah, the chunked example is exactly what the existing logic was doing
Can somebody explain to me why the compiler is not able to "see" the timer function? My project can see other classes from the kotlinx.coroutines.channels package. I'm trying to understand why it is hidden or not available.
This is that sample code that seems to be used in a lot of places for chunking. https://dev.to/psfeng/a-story-of-building-a-custom-flow-operator-buffertimeout-4d95