Andreas Scheja01/03/2023, 9:32 AM
hooks don't have suspending handlers? At least the latter is given a
so suspending calls should be quite common?
Aleksei Tirman [JB]01/03/2023, 1:27 PM
e5l01/03/2023, 1:31 PM
? As for
, we can add suspension there. I made a ticket: https://youtrack.jetbrains.com/issue/KTOR-5406/Add-suspend-modifier-to-ReceiveRequestBytes-hook
Andreas Scheja01/03/2023, 3:27 PM
right now, but is there a compelling reason not to change it? I mean if you want to call something suspending in there (and can't just
it in a fire-and-forget manner) you have to bridge it with
, which would block the thread of the coroutine calling the hook -> not a good solution for a busy server.