Mercurial > hg > tony
comparison main/main.cpp @ 609:ef0778016c88
Version and beta warning
author | Chris Cannam |
---|---|
date | Wed, 09 Oct 2019 14:58:10 +0100 |
parents | e50b2e568679 |
children | e06cbdc7301c |
comparison
equal
deleted
inserted
replaced
608:d3abe983e1c0 | 609:ef0778016c88 |
---|---|
53 signalHandler(int /* signal */) | 53 signalHandler(int /* signal */) |
54 { | 54 { |
55 // Avoid this happening more than once across threads | 55 // Avoid this happening more than once across threads |
56 | 56 |
57 cerr << "signalHandler: cleaning up and exiting" << endl; | 57 cerr << "signalHandler: cleaning up and exiting" << endl; |
58 cleanupMutex.lock(); | 58 |
59 if (!cleanedUp) { | 59 if (cleanupMutex.tryLock(5000)) { |
60 TempDirectory::getInstance()->cleanup(); | 60 if (!cleanedUp) { |
61 cleanedUp = true; | 61 TempDirectory::getInstance()->cleanup(); |
62 } | 62 cleanedUp = true; |
63 cleanupMutex.unlock(); | 63 } |
64 cerr << "signalHandler: cleaned up" << endl; | 64 cleanupMutex.unlock(); |
65 } | |
66 | |
65 exit(0); | 67 exit(0); |
66 } | 68 } |
67 | 69 |
68 class TonyApplication : public QApplication | 70 class TonyApplication : public QApplication |
69 { | 71 { |