I am trying to have a better understanding of how OrderedThreadPoolExecutor works.
My focus is on the OrderedThreadPoolExecutor, and when will it create new threads beyond corePoolSize, if i don´t specify a eventQueueHandler to it. >From what i see in the code, not specifying any eventQueueHandler will in fact specify a IoEventQueueHandler.NOOP eventQueueHandler which is "A dummy handler which always accepts events doing nothing particular" So if i understand correctly, when i create this OrderedThreadPoolExecutor with no specific eventQueueHandler it should never create any thread beyond corePoolSize. But, in a service we have running, we get sometimes 100s of threads beyond corePoolSize in this use case. So maybe there is another reason for a new thread to be spawned. Is there any more documentation / explanations on this behaviour? Finally, if anyone could explain me exactly how the OrderedThreadPoolExecutor asserts that a task from one session is not run before another one i would love to read it. My current understanding is that it looks in the queue for the task that wants to run, and if no other task is running for that session, it runs it. But this would mean that if a session has two tasks, and one that takes 30 seconds to run, no other task will be able to run until the long one ends, cause task number 2 from this session is first on the list and waiting. Please correct me. -- Nicolás Cohen QB9 Phone: +54 11 4855 9371 Int. 106
