Hi
I can't simply send
a plain path because I've heavily modified the ThreadPool to fit my code
"environment" (my loggers, assertions etc.) and my personal preferences (threads
grouped and named, tasks as plain java.lang.Runnable), etc.
but I think the
following two changes can be applied to the original code :
1)
if the setter for
thread numbers are to be invoked AFTER the pool has started:
they
should be synchronized and should call adjustLimits
else (if they are
NOT intented to to be invoked AFTER the pool has started)
remove
them and define a constructor with all needed params
2)
the control and
monitor inner classes can be declared static because they get the outer class
explicitly in their c'tors
(so one pointer can
be saved for each inner instance).
regards,
Edo