Hi I trying to wrap callback based api with corout...
# coroutines
k
Hi I trying to wrap callback based api with coroutines. This api can fire multiple times so I am using channels. Now I am facing the problem that when user stops using channel my callback is still attached to the source. Is there any way to add onCancelListener to channel so I can cancel my internal callback?
e
Not yet, but there is a discussed enhancement that might help: https://github.com/Kotlin/kotlinx.coroutines/issues/260