comparison base/Thread.h @ 408:115f60df1e4d

* Speed up spectrogram painting by releasing mutex in FFTDataServer while calculating data prior to writing it, and by adding whole-column value query methods to FFT objects * Add paint cache to Thumbwheel -- repaints of this widget were slowing down the whole spectrogram repaint * More uses of MutexLocker (named and with debug) and more profile points * Make startup much quicker some of the time, with OSC server in place
author Chris Cannam
date Thu, 08 May 2008 14:46:22 +0000
parents 183ee2a55fc7
children c01cbe41aeb5
comparison
equal deleted inserted replaced
407:88ad01799040 408:115f60df1e4d
17 #define _THREAD_H_ 17 #define _THREAD_H_
18 18
19 #include <QThread> 19 #include <QThread>
20 #include <QMutexLocker> 20 #include <QMutexLocker>
21 21
22 #include "Profiler.h"
23
22 class Thread : public QThread 24 class Thread : public QThread
23 { 25 {
24 Q_OBJECT 26 Q_OBJECT
25 27
26 public: 28 public:
36 38
37 private: 39 private:
38 Type m_type; 40 Type m_type;
39 }; 41 };
40 42
41
42 class MutexLocker 43 class MutexLocker
43 { 44 {
44 public: 45 public:
45 MutexLocker(QMutex *mutex, const char *name); 46 MutexLocker(QMutex *mutex, const char *name);
46 ~MutexLocker(); 47 ~MutexLocker();
53 54
54 private: 55 private:
55 const char *m_name; 56 const char *m_name;
56 }; 57 };
57 58
59 Profiler m_profiler;
58 Printer m_printer; 60 Printer m_printer;
59 QMutexLocker m_locker; 61 QMutexLocker m_locker;
60 }; 62 };
61 63
62 #endif 64 #endif