I agree with you. I read the code too fast.
And as always, I learn something more...
Thank you
Frederic
--------------
> public SocketAcceptor()
> {
> int nbProc = Runtime.getRuntime().availableProcessors();
> if (nbProc == 1)
> this( 1, new NewThreadExecutor() );
> else {
> Executor executor = Executors.nexFixedThreadPool(nbProc);
> this( nbProc, executor ) ;
> }
> }
This would actually be much easier, just replace the '1' with
'Runtime.getRuntime().availableProcessors()'.
The 'NewThreadExecutor' means that the threads aren't from a pool,
rather it just creates a new thread for each task submitted.
-pete
--
[EMAIL PROTECTED] - http://fotap.org/~osi