bloritsch 2002/09/17 09:56:36
Modified: event/src/java/org/apache/excalibur/event/command
TPCThreadManager.java TPSPThreadManager.java
Log:
apply patches from Marc Shier
Revision Changes Path
1.26 +2 -2
jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/command/TPCThreadManager.java
Index: TPCThreadManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/command/TPCThreadManager.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- TPCThreadManager.java 6 Sep 2002 15:40:52 -0000 1.25
+++ TPCThreadManager.java 17 Sep 2002 16:56:36 -0000 1.26
@@ -133,14 +133,14 @@
{
this.m_processors = Math.max( 1 , SystemUtil.numProcessors() );
}
-
+
if( isInitialized() )
{
throw new IllegalStateException( "ThreadManager is already initailized"
);
}
m_tpool = new DefaultThreadPool( "TPCThreadManager",
- ( m_processors *
m_threadsPerProcessor ) + 1 );
+ ( m_processors *
m_threadsPerProcessor ) + 1, (int)m_blockTimeout );
if( null == getLogger() )
{
1.13 +8 -1
jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/command/TPSPThreadManager.java
Index: TPSPThreadManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/event/src/java/org/apache/excalibur/event/command/TPSPThreadManager.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- TPSPThreadManager.java 8 Aug 2002 00:36:26 -0000 1.12
+++ TPSPThreadManager.java 17 Sep 2002 16:56:36 -0000 1.13
@@ -93,11 +93,18 @@
public TPSPThreadManager( int numProcessors, int threadsPerProcessor, long
sleepTime )
throws Exception
{
+ this( numProcessors, threadsPerProcessor, sleepTime, 1000L );
+ }
+
+
+ public TPSPThreadManager( int numProcessors, int threadsPerProcessor, long
sleepTime, long timeOut )
+ throws Exception
+ {
int processors = Math.max( numProcessors, 1 );
int threads = Math.max( threadsPerProcessor, 1 );
m_threadPool = new DefaultThreadPool( "TPCThreadManager",
- ( processors * threads ) + 1
);
+ ( processors * threads ) +
1, (int) timeOut );
m_sleepTime = sleepTime;
m_threadControl = m_threadPool.execute( this );
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>