A coroutineScope or dispatcher will need to be passed into via some mechanism (passed as param or expect/actual). For main thread this is Dispatchers.Main. For non main thread this may be more complicated. I was under the impression it is possible to have a coroutine scope tied to a specific thread, but now I am not too sure about that.