changeset 576:2ba202c5be8d

* various minor bits
author Chris Cannam
date Mon, 16 Mar 2009 16:36:23 +0000
parents 8688430850d6
children f9cf4b49b08b
files base/RingBuffer.h transform/TransformFactory.cpp
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/base/RingBuffer.h	Mon Mar 16 16:32:02 2009 +0000
+++ b/base/RingBuffer.h	Mon Mar 16 16:36:23 2009 +0000
@@ -198,6 +198,7 @@
     std::cerr << "&m_readers = " << &m_readers << std::endl;
     std::cerr << "&m_size = " << &m_size << std::endl;
 */
+    
     for (int i = 0; i < N; ++i) m_readers[i] = 0;
 
     m_scavenger.scavenge();
--- a/transform/TransformFactory.cpp	Mon Mar 16 16:32:02 2009 +0000
+++ b/transform/TransformFactory.cpp	Mon Mar 16 16:36:23 2009 +0000
@@ -325,7 +325,9 @@
     TransformDescriptionMap transforms;
 
     populateFeatureExtractionPlugins(transforms);
+    if (m_exiting) return;
     populateRealTimePlugins(transforms);
+    if (m_exiting) return;
 
     // disambiguate plugins with similar names
 
@@ -389,6 +391,7 @@
 {
     std::vector<QString> plugs =
 	FeatureExtractionPluginFactory::getAllPluginIdentifiers();
+    if (m_exiting) return;
 
     for (size_t i = 0; i < plugs.size(); ++i) {
 
@@ -485,6 +488,7 @@
 {
     std::vector<QString> plugs =
 	RealTimePluginFactory::getAllPluginIdentifiers();
+    if (m_exiting) return;
 
     static QRegExp unitRE("[\\[\\(]([A-Za-z0-9/]+)[\\)\\]]$");
 
@@ -617,13 +621,17 @@
 void
 TransformFactory::populateUninstalledTransforms()
 {
+    if (m_exiting) return;
+
     populateTransforms();
+    if (m_exiting) return;
 
     MutexLocker locker(&m_uninstalledTransformsMutex,
                        "TransformFactory::populateUninstalledTransforms");
     if (m_uninstalledTransformsPopulated) return;
 
     PluginRDFIndexer::getInstance()->indexConfiguredURLs();
+    if (m_exiting) return;
 
     //!!! This will be amazingly slow
 
@@ -710,7 +718,7 @@
             m_uninstalledTransforms[tid] = td;
         }
 
-        if (m_exiting) break;
+        if (m_exiting) return;
     }
 
     m_uninstalledTransformsPopulated = true;