Changeset 1144 for trunk/src/thread/threadbase.h
- Timestamp:
- Feb 25, 2012, 2:38:42 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/thread/threadbase.h
r1109 r1144 75 75 }; 76 76 77 class QueueBase77 template<typename T, int N> class QueueBase 78 78 { 79 79 public: … … 106 106 } 107 107 108 void Push( intvalue)108 void Push(T value) 109 109 { 110 110 #if defined HAVE_PTHREAD_H … … 135 135 } 136 136 137 intPop()137 T Pop() 138 138 { 139 139 #if defined HAVE_PTHREAD_H … … 152 152 153 153 /* Pop value */ 154 intret = m_values[m_start];154 T ret = m_values[m_start]; 155 155 m_start = (m_start + 1) % CAPACITY; 156 156 m_count--; … … 170 170 171 171 private: 172 static size_t const CAPACITY = 100;173 intm_values[CAPACITY];172 static size_t const CAPACITY = N; 173 T m_values[CAPACITY]; 174 174 size_t m_start, m_count; 175 175 #if defined HAVE_PTHREAD_H
Note: See TracChangeset
for help on using the changeset viewer.