Currently, when you specify a different Pool Size after construction, the entire Pool is reinitialized.
This is very bad, because any pending Events to be processed by the Threads within the Pool get dropped.
The correct behaviour would be as follows:
If New Size > Current Size... simply construct the new Thread and it will begin receiving Events.
If New Size < Current Size... nominate lowest performing Thread, instruct it to no longer accept Events, allow it to cycle until its Queue and Stack are empty, then destroy it (adjusting the Pool accordingly).
Currently, when you specify a different Pool Size after construction, the entire Pool is reinitialized.
This is very bad, because any pending Events to be processed by the Threads within the Pool get dropped.
The correct behaviour would be as follows:
If New Size > Current Size... simply construct the new Thread and it will begin receiving Events. If New Size < Current Size... nominate lowest performing Thread, instruct it to no longer accept Events, allow it to cycle until its Queue and Stack are empty, then destroy it (adjusting the Pool accordingly).