Does anybody here know what resources (Java thread...
# coroutines
g
Does anybody here know what resources (Java threads) coroutines are running on if you run ktor with netty? Especially how the http thread pool vs worker pool works? E.g. If I get a request in a route and then start to call a service layer without changing the dispatcher myself
o
according to https://github.com/ktorio/ktor/blob/master/ktor-server/ktor-server-netty/jvm/src/io/ktor/server/netty/NettyApplicationEngine.kt#L71-L90 there are 2-3 work pools, one for connection accepting, one for being netty's worker pool, and either one more for processing public Ktor code (i.e. this is where your call comes in) OR this is shared with the netty worker pool (configuration option)
g
Ok. So when I get the call in code I've written netty has already then their magic with the http pool? And at that point I'm working with ktors pool by default?
o
it depends on the configuration option you set
g
Ok, I'll check tomorrow when I'm by my laptop and not phone. Thanks!