Author: mwebb
Date: Tue Jun 19 11:12:39 2007
New Revision: 548811
URL: http://svn.apache.org/viewvc?view=rev&rev=548811
Log:
changed the constructor that takes in an Executor. Now the thread count is the
number of processors plus one
Modified:
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
Modified:
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
URL:
http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java?view=diff&rev=548811&r1=548810&r2=548811
==============================================================================
---
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
(original)
+++
mina/trunk/core/src/main/java/org/apache/mina/transport/socket/nio/SocketAcceptor.java
Tue Jun 19 11:12:39 2007
@@ -83,9 +83,16 @@
this( new NewThreadExecutor() );
}
+ /**
+ * Creates an acceptor with a processing thread count set to the
+ * number of available processors + 1 and the submitted executor
+ *
+ * @param executor
+ * Executor to use for launching threads
+ */
public SocketAcceptor(Executor executor)
{
- this(Runtime.getRuntime().availableProcessors(), executor);
+ this(Runtime.getRuntime().availableProcessors()+1, executor);
}
/**