proyal 2003/09/04 11:02:56
Modified: event/src/java/org/apache/excalibur/event/command
TPCThreadManager.java
Log:
Match Avalon style ;)
Revision Changes Path
1.44 +5 -2
avalon-excalibur/event/src/java/org/apache/excalibur/event/command/TPCThreadManager.java
Index: TPCThreadManager.java
===================================================================
RCS file:
/home/cvs/avalon-excalibur/event/src/java/org/apache/excalibur/event/command/TPCThreadManager.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- TPCThreadManager.java 4 Sep 2003 08:12:33 -0000 1.43
+++ TPCThreadManager.java 4 Sep 2003 18:02:55 -0000 1.44
@@ -143,7 +143,8 @@
m_threadPool.setMinimumPoolSize( 2 ); // at least two threads
m_threadPool.setMaximumPoolSize( maxPoolSize );
m_threadPool.waitWhenBlocked();
- if (maxPoolSize == 2) {
+ if( maxPoolSize == 2 )
+ {
// The PooledExecutor has an inherent race condition between releasing
threads
// and adding new tasks (when using the waitWhenBlocked policy):
// it could be that a thread is being released while a new
@@ -155,7 +156,9 @@
// As a solution to this problem, the one available work-thread we have
in this case
// is set to never expire.
m_threadPool.setKeepAliveTime( -1 );
- } else {
+ }
+ else
+ {
m_threadPool.setKeepAliveTime( m_keepAliveTime );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]