I’m working on an API that needs a `CoroutineScope...
# coroutines
m
I’m working on an API that needs a
CoroutineScope
but must provide a Java-friendly API. I came up with an idea of accepting a `Executor`/`ExecutorService` and convert it to a scope as following:
CoroutineScope(context = executorService.asCoroutineDispatcher())
- it seems to be working correctly, even when the service shutdown. My question is: is there any problem in this approach that I’m not aware of, or is there any alternative?