Mercurial > hg > svcore
comparison base/Thread.h @ 244:85bf384db35f
* Update to use new vamp-hostsdk instead of vamp-sdk
* Make spectrogram adapt its paint block size depending on how long it actually
takes to draw
* Some thread debugging infrastructure
| author | Chris Cannam |
|---|---|
| date | Fri, 02 Mar 2007 13:01:41 +0000 |
| parents | 61a2ac1241b3 |
| children | 183ee2a55fc7 |
comparison
equal
deleted
inserted
replaced
| 243:ff46f251139e | 244:85bf384db35f |
|---|---|
| 15 | 15 |
| 16 #ifndef _THREAD_H_ | 16 #ifndef _THREAD_H_ |
| 17 #define _THREAD_H_ | 17 #define _THREAD_H_ |
| 18 | 18 |
| 19 #include <QThread> | 19 #include <QThread> |
| 20 #include <QMutexLocker> | |
| 20 | 21 |
| 21 class Thread : public QThread | 22 class Thread : public QThread |
| 22 { | 23 { |
| 23 Q_OBJECT | 24 Q_OBJECT |
| 24 | 25 |
| 32 | 33 |
| 33 private: | 34 private: |
| 34 Type m_type; | 35 Type m_type; |
| 35 }; | 36 }; |
| 36 | 37 |
| 38 | |
| 39 class MutexLocker | |
| 40 { | |
| 41 public: | |
| 42 MutexLocker(QMutex *mutex, const char *name); | |
| 43 ~MutexLocker(); | |
| 44 | |
| 45 private: | |
| 46 class Printer { | |
| 47 public: | |
| 48 Printer(const char *name); | |
| 49 ~Printer(); | |
| 50 | |
| 51 private: | |
| 52 const char *m_name; | |
| 53 }; | |
| 54 | |
| 55 Printer m_printer; | |
| 56 QMutexLocker m_locker; | |
| 57 }; | |
| 58 | |
| 37 #endif | 59 #endif |
