i just need a little clarification on something real quick if someone has a few moments..
i have a service which utilizes a singleton instance because i utilize async callbacks (subscription list etc). it's also set to use multithreading because of some of the operations the service needs to perform.
at the moment i only have 1 middleware client, another service which is multithreaded to handle multiple web clients which acts as a 'proxy' to my service.
i know that right now there will only be 1 instance, but with multiple concurrent calls. keeping in line with the architecture above, does each call made come in on the same thread, same instance or different thread same instance? and if it is the same thread,
doesn't it strike anyone as odd that i would need to bottleneck each call by locking it?
second thought: the per-call semantics are what i'd like to use, however then everything is just instanced out and messes up the callbacks, right?
ideally, what i'd like is to use the same instance, but have it automatically create a new thread on each call so that i don't have to lock.. or is that what it does and i'm not understanding correctly?
View Complete Post