You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2007/02/07 22:29:33 UTC
svn commit: r504698 -
/incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java
Author: schor
Date: Wed Feb 7 13:29:33 2007
New Revision: 504698
URL: http://svn.apache.org/viewvc?view=rev&rev=504698
Log:
UIMA-284 Expand Synch section to include code that is testing
value leading to the wait() to insure notify doesn't come
before the wait (and thereby get "lost").
Modified:
incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java
Modified: incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java?view=diff&rev=504698&r1=504697&r2=504698
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-cpe/src/main/java/org/apache/uima/collection/impl/cpm/container/ProcessingContainer_Impl.java Wed Feb 7 13:29:33 2007
@@ -1129,6 +1129,7 @@
try {
do {
long t = System.currentTimeMillis();
+ synchronized (casProcessorPool) {
CasProcessor processor = casProcessorPool.checkOut();
fetchTime += (System.currentTimeMillis() - t);
if (processor == null) {
@@ -1138,13 +1139,11 @@
"UIMA_CPM_wait_no_processor__FINEST",
new Object[] { Thread.currentThread().getName(), getName() });
}
- synchronized (casProcessorPool) {
- casProcessorPool.wait();
- }
+ casProcessorPool.wait();
} else {
return processor;
}
-
+ }
} while (true);
} catch (Exception e) {
UIMAFramework.getLogger(this.getClass()).logrb(Level.SEVERE, this.getClass().getName(),