Closed victorizbitskiy closed 3 years ago
Hmmm...not exactly, this is to try and prevent that. More a failsafe, ideally is up to the client application to manage how many threads to trigger. This particular code requires at least 3 to be idle for a new thread to start, so the system is happy to take new requests from others, while the application trying to thread will have to wait for an user to disconnect or another thread to finish. I have not experienced issues with this so far. There is an unit test for it but maybe not stressing this enough...
What I should do is update the documentation explaining clients to manage the max threads running. I have plans of implementing a ThreadPoolExecutor to allow submits of threads but only having a predefined max running at a time upon invokeAll. https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html
What I should do is update the documentation explaining clients to manage the max threads running. I have plans of implementing a ThreadPoolExecutor to allow submits of threads but only having a predefined max running at a time upon invokeAll.
Yes, this is probably what needs to be done. If you are interested, you can see how I implemented this in my project.
Very nice, thank you! I see you are using SPTA framework, I was unfamiliar with it...
Implemented zcl_executors, zcl_thread_pool_executor ;)
Does this mean that during parallelization more than 2 users will not be able to log into the system, because will all dialog processes (DIA) be busy?