24 #ifndef __CORE_UTILS_RWLOCK_QUEUE_H_
25 #define __CORE_UTILS_RWLOCK_QUEUE_H_
27 #include <core/threading/read_write_lock.h>
28 #include <core/utils/refptr.h>
34 template <
typename Type>
74 template <
typename Type>
84 template <
typename Type>
86 : std::queue<Type>::queue(ll)
93 template <
typename Type>
101 template <
typename Type>
105 __rwlock->lock_for_read();
110 template <
typename Type>
114 __rwlock->lock_for_write();
121 template <
typename Type>
125 return __rwlock->try_lock_for_read();
132 template <
typename Type>
136 return __rwlock->try_lock_for_write();
141 template <
typename Type>
145 return __rwlock->unlock();
152 template <
typename Type>
156 __rwlock->lock_for_write();
157 std::queue<Type>::push(x);
164 template <
typename Type>
168 __rwlock->lock_for_write();
169 std::queue<Type>::pop();
175 template <
typename Type>
179 __rwlock->lock_for_write();
180 while ( ! std::queue<Type>::empty() ) {
181 std::queue<Type>::pop();
191 template <
typename Type>