Changeset 3062
- Timestamp:
- Jul 2, 2013, 5:08:42 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/queue.cc
r3057 r3062 73 73 workers.join_all(); 74 74 75 std::cerr << "OK\n"; 76 return 0; 75 Queue<std::string> queue2(queue); 76 77 queue2 = queue; 78 79 return suite.return_value(); 77 80 } -
trunk/yat/utility/Queue.h
r3061 r3062 22 22 23 23 #include <deque> 24 #include <utility> 24 25 25 26 namespace theplu { … … 58 59 */ 59 60 typedef typename std::deque<T>::size_type size_type; 61 62 /** 63 \brief Create a Queue with no elements 64 */ 65 Queue(void) {} 66 67 /** 68 \brief Create a Queue with no elements 69 70 \note is not thread safe 71 */ 72 Queue(const Queue& other) : q_(other.q_) {} 60 73 61 74 /** … … 129 142 } // lock is released here 130 143 144 145 /** 146 \brief assignment operator 147 148 \note is not thread safe 149 */ 150 Queue& operator=(const Queue& lhs) 151 { 152 q_ = lhs.q_; 153 return *this; 154 } 155 131 156 private: 132 157 std::deque<T> q_; 133 158 mutable boost::mutex mutex_; 134 159 boost::condition_variable condition_; 135 136 // Using compiler generated (not thread safe) copy and assignment137 //Queue(const Queue&);138 //Queue& operator=(const Queue&);139 160 }; 140 161
Note: See TracChangeset
for help on using the changeset viewer.