I'm trying to build a filter for incoming calls pr...
# ktor
m
I'm trying to build a filter for incoming calls produced parallelly let's say that you call simultaneously from the client a route called test, like test(0),test(0),test(0),test(1),test(3) test(1). The purpose is that in the server simultaneous calls to the same key are delayed till the result of first one is produced. That's the current solution I'm working on https://gist.github.com/Abegemot/157a548ac4c1725c66fc45e584a66cdd . Unfortunately it does not solve the problem totally ..... If someone could have a look at it I'll really appreciate. I really thing it is a very useful feature to have.
The problem was that I used Mutex() inside a function instead of having just an object Mutex() , or instead just synchronize the methods, now it works flawlessly.