Hey guys. I'm wondering whether I still haven't fu...
# ktor
m
Hey guys. I'm wondering whether I still haven't fully understood either coroutines or the way ktor uses them. For example here in line 32: https://github.com/ktorio/ktor/blob/0.9.5/ktor-features/ktor-jackson/src/io/ktor/jackson/JacksonConverter.kt#L32 When a response object is for example converted to JSON using jackson then the synchronous function
objectmapper.writeValueAsString(…)
is called within a suspend function. It could take a while for a complex object to be serialized to a string. As far as I understand the coroutine context would be blocked until this is done. Doesn't it cause a bottleneck or even temporarily block other requests from being processed if a ktor coroutine is blocked by a synchronous call?