I am looking at using ConcurrencyThrottleInterceptor to limit concurrent requests to a part of my application where there is contention on the database.
ConcurrencyThrottleSupport doesn't seem to have a Queue for the waiting threads instead it uses Object.wait() to block threads. The problem with this approach is that:
"If any threads are waiting on this object, one of them is chosen to be awakened. The choice is arbitrary and occurs at the discretion of the implementation."
So I could have an unlucky thread that is never chosen to be awakened while some other lucky threads jump the queue.
am I right in thinking that this behaviour is possible? And if so - should I worry about it?
Thanks for reading!!!