Are there any other pools that ship with coroutine...
# coroutines
Are there any other pools that ship with coroutines than the CommonPool? The common pool is backed by ForkJoinPool which unfortunately isn’t great for I/O intensive tasks where most the time is spent waiting.
You can also use the extension function
on an
to convert any executor service into a context/dispatcher
Coroutines are meant for spuspended functions. If you make your idling calls
, threads won't be blocked AFAIK
Thanks @groostav
@dekans The main problem with the FJP is how it handles parallelism internally although I will try to make my idling calls suspend.
@omarkj @dekans I must confess I was very bullish about coroutines (and still am), but IO has been a wet-blanket on the whole thing. We're using (blocking)
in some places, old-school streams in others, and even Kernel32 pipes in some. these objects dont have nice suspendable/CompletableFuture/callback-based API's so I'm left to writing wrapper functions that dedicate a thread to a blocking call and offer the result on a
suspend fun
I have a decent callback-based API I’m working with, but the volume of callbacks is causing me some issues.
Currently working on ~30 callbacks resolving a few thousands futures (since it’s batch work). This is causing me some headaches.