Mercurial > hg > orthanc
diff OrthancServer/ServerIndex.cpp @ 1306:8cd5784a6d80
IDatabaseWrapper::HasFlushToDisk()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 10 Feb 2015 17:17:25 +0100 |
parents | 536515f87cb4 |
children | 61ce8147f30d |
line wrap: on
line diff
--- a/OrthancServer/ServerIndex.cpp Tue Feb 10 17:11:00 2015 +0100 +++ b/OrthancServer/ServerIndex.cpp Tue Feb 10 17:17:25 2015 +0100 @@ -553,7 +553,11 @@ // execution of Orthanc StandaloneRecycling(); - flushThread_ = boost::thread(FlushThread, this); + if (db.HasFlushToDisk()) + { + flushThread_ = boost::thread(FlushThread, this); + } + unstableResourcesMonitorThread_ = boost::thread(UnstableResourcesMonitorThread, this); } @@ -562,7 +566,8 @@ { done_ = true; - if (flushThread_.joinable()) + if (db_.HasFlushToDisk() && + flushThread_.joinable()) { flushThread_.join(); }