elizarov
06/12/2017, 8:55 PMkotlinx.coroutines
, but you can create your own one in just a few lines. You are doing it the right way. There are many ways to do it. You can also extract for (msg in channel)
loop, so that your logic is in a separate function that you'll overwrite in each subclass.