You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by wt...@apache.org on 2009/04/17 03:14:45 UTC
svn commit: r765824 -
/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/BatchProcessor.java
Author: wtam
Date: Fri Apr 17 01:14:44 2009
New Revision: 765824
URL: http://svn.apache.org/viewvc?rev=765824&view=rev
Log:
Improve fixes for [CAMEL-1510] on Christopher Hunt's behalf.
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/processor/BatchProcessor.java
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/BatchProcessor.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/BatchProcessor.java?rev=765824&r1=765823&r2=765824&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/BatchProcessor.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/BatchProcessor.java Fri Apr 17 01:14:44 2009
@@ -211,9 +211,8 @@
// The goal of the following algorithm in terms of synchronisation
// is to provide fine grained locking i.e. retaining the lock only
// when required. Special consideration is given to releasing the
- // lock when calling an overloaded method such as isInBatchComplete,
- // isOutBatchComplete and around sendExchanges. The latter is
- // especially important as the process of sending out the exchanges
+ // lock when calling an overloaded method i.e. sendExchanges.
+ // Unlocking is important as the process of sending out the exchanges
// would otherwise block new exchanges from being queued.
queueLock.lock();
@@ -232,13 +231,8 @@
drainQueueTo(collection, batchSize);
}
- queueLock.unlock();
- try {
- if (!isOutBatchCompleted()) {
- continue;
- }
- } finally {
- queueLock.lock();
+ if (!isOutBatchCompleted()) {
+ continue;
}
}