Mercurial > hg > svcore
diff data/fft/FFTDataServer.h @ 547:806e3c72b5df
* fix deadlock in fft memory cache usage
author | Chris Cannam |
---|---|
date | Wed, 04 Feb 2009 20:39:11 +0000 |
parents | a5a17152b6df |
children | 1469caaa8e67 |
line wrap: on
line diff
--- a/data/fft/FFTDataServer.h Wed Feb 04 15:03:42 2009 +0000 +++ b/data/fft/FFTDataServer.h Wed Feb 04 20:39:11 2009 +0000 @@ -171,7 +171,10 @@ m_cacheVectorLock.lockForRead(); CacheBlock *cb(m_caches.at(c)); if (cb) { - if (cb->memoryCache) return cb->memoryCache; + if (cb->memoryCache) { + m_cacheVectorLock.unlock(); + return cb->memoryCache; + } if (cb->fileCacheWriter) { QThread *me = QThread::currentThread(); CacheBlock::ThreadReaderMap &map = cb->fileCacheReader;