Mercurial > hg > svcore
comparison transform/TransformFactory.cpp @ 477:e0784311a103
* Start thread to populate uninstalled transforms only on request
(so runner doesn't have to have it)
author | Chris Cannam |
---|---|
date | Tue, 11 Nov 2008 09:41:45 +0000 |
parents | a70dcfed59c1 |
children | f933062a7f80 |
comparison
equal
deleted
inserted
replaced
476:acddcc3cca36 | 477:e0784311a103 |
---|---|
49 return m_instance; | 49 return m_instance; |
50 } | 50 } |
51 | 51 |
52 TransformFactory::TransformFactory() : | 52 TransformFactory::TransformFactory() : |
53 m_transformsPopulated(false), | 53 m_transformsPopulated(false), |
54 m_uninstalledTransformsPopulated(false) | 54 m_uninstalledTransformsPopulated(false), |
55 { | 55 m_thread(0) |
56 UninstalledTransformsPopulateThread *thread = | 56 { |
57 new UninstalledTransformsPopulateThread(this); | |
58 thread->start(); | |
59 } | 57 } |
60 | 58 |
61 TransformFactory::~TransformFactory() | 59 TransformFactory::~TransformFactory() |
62 { | 60 { |
61 } | |
62 | |
63 void | |
64 TransformFactory::startPopulationThread() | |
65 { | |
66 MutexLocker locker(&m_uninstalledTransformsMutex, | |
67 "TransformFactory::startPopulationThread"); | |
68 | |
69 if (m_thread) return; | |
70 | |
71 m_thread = new UninstalledTransformsPopulateThread(this); | |
72 m_thread->start(); | |
63 } | 73 } |
64 | 74 |
65 TransformList | 75 TransformList |
66 TransformFactory::getAllTransformDescriptions() | 76 TransformFactory::getAllTransformDescriptions() |
67 { | 77 { |