I'm using both in my app.
Kotlin Coroutines are used for single interactions, such as a DB or an API call.
But also I'm using RxJava Flowable to observe sensor events.
Kotlin Coroutines has dispatches, and RxJava has shedulers.
The idea of them is to provide maximally efficient thread pools, which size depends on hardware configuration.
So if I use both simultaneously, I can have, for example, 8 running threads, 4 in Dispatchers.Default and 4 in Shedulers.computation, instead of 4 threads.
So my question is
Is there a way use
Kotlin DispatchersasRxJava shedulersor vise versa?Or I should define my own
executors, and builddispatchersandshedulersfrom them?