Author: davsclaus
Date: Wed Jun 18 21:38:40 2008
New Revision: 669385
URL: http://svn.apache.org/viewvc?rev=669385&view=rev
Log:
CAMEL-605 sleeping for 1 millis to avoid concurrency issues with high
throughtput on all kind of platforms.
Modified:
activemq/camel/trunk/camel-core/pom.xml
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Modified: activemq/camel/trunk/camel-core/pom.xml
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/pom.xml?rev=669385&r1=669384&r2=669385&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/pom.xml (original)
+++ activemq/camel/trunk/camel-core/pom.xml Wed Jun 18 21:38:40 2008
@@ -123,7 +123,7 @@
<forkMode>pertest</forkMode>
<excludes>
<!-- TODO FIXME ASAP -->
- <exclude>**/DataSetSedaTest.*</exclude>
+ <exclude>**/XXXTest.*</exclude>
</excludes>
</configuration>
</plugin>
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
URL:
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java?rev=669385&r1=669384&r2=669385&view=diff
==============================================================================
---
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
(original)
+++
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/component/dataset/DataSetConsumer.java
Wed Jun 18 21:38:40 2008
@@ -65,13 +65,12 @@
try {
long delay = endpoint.getProduceDelay();
- if (delay > 0) {
- Thread.sleep(delay);
- } else {
- // if no delay set then we must sleep at lest for 1
nano to avoid concurrency
+ if (delay < 1) {
+ // if no delay set then we must sleep at lest for 1
millis to avoid concurrency
// issues with extremly high throughtput
- Thread.sleep(0, 1);
+ delay = 1;
}
+ Thread.sleep(delay);
} catch (InterruptedException e) {
// ignore and just log to debug
LOG.debug(e);