Mercurial > hg > sonic-visualiser
comparison main/main.cpp @ 2342:175ece418988
Merge from branch time-frequency-boxes
author | Chris Cannam |
---|---|
date | Mon, 07 Oct 2019 09:36:11 +0100 |
parents | 3dacb1001537 |
children | 7bed1c28b5e9 |
comparison
equal
deleted
inserted
replaced
2341:f670b7653f8e | 2342:175ece418988 |
---|---|
186 signalHandler(int /* signal */) | 186 signalHandler(int /* signal */) |
187 { | 187 { |
188 // Avoid this happening more than once across threads | 188 // Avoid this happening more than once across threads |
189 | 189 |
190 cerr << "signalHandler: cleaning up and exiting" << endl; | 190 cerr << "signalHandler: cleaning up and exiting" << endl; |
191 cleanupMutex.lock(); | 191 |
192 if (!cleanedUp) { | 192 if (cleanupMutex.tryLock(5000)) { |
193 TempDirectory::getInstance()->cleanup(); | 193 if (!cleanedUp) { |
194 cleanedUp = true; | 194 TempDirectory::getInstance()->cleanup(); |
195 } | 195 cleanedUp = true; |
196 cleanupMutex.unlock(); | 196 } |
197 cleanupMutex.unlock(); | |
198 } | |
199 | |
197 exit(0); | 200 exit(0); |
198 } | 201 } |
199 | 202 |
200 class SVApplication : public QApplication | 203 class SVApplication : public QApplication |
201 { | 204 { |