I am expecting questions on why I want to do this,...
# ktor
v
I am expecting questions on why I want to do this, but anyways: https://stackoverflow.com/questions/52813746/state-in-ktor-intercepters
n
you could always access
Copy code
object State {
    var timeout: Int = 0
}
or if you have multiple routes maybe a map
do not forget to reset the timeout eventually too
v
I would really want it to be local to the route
o
Well, even if coroutines are there, it doesn’t mean you don’t need any synchronization when running them on multiple threads…
In general, you can put your state into
Attributes
of a Route pipeline.
v
I see, thanks!