#include <GuardedQueue.h>
Collaboration diagram for vpr::GuardedQueue:

Public Methods | |
| GuardedQueue () | |
| ~GuardedQueue () | |
| bool | empty () |
| value_type & | front () |
| value_type & | back () |
| void | push (const value_type &val) |
| void | pop () |
| int | size () const |
Guards an STL queue and implements the basic interface All the functions pass directly through to the corresponding STL queue function but they are guarded so that only a single thread can interact with the queue at once.
Definition at line 63 of file GuardedQueue.h.
|
|||||||||
|
Definition at line 66 of file GuardedQueue.h.
00067 {;}
|
|
|||||||||
|
Definition at line 69 of file GuardedQueue.h.
00070 {;}
|
|
|||||||||
|
Definition at line 72 of file GuardedQueue.h.
00073 {
00074 Guard<Mutex> guard(mMutexGuard);
00075 return mQ.empty();
00076 }
|
|
|||||||||
|
Definition at line 78 of file GuardedQueue.h.
00079 {
00080 Guard<Mutex> guard(mMutexGuard);
00081 return mQ.front();
00082 }
|
|
|||||||||
|
Definition at line 84 of file GuardedQueue.h.
00085 {
00086 Guard<Mutex> guard(mMutexGuard);
00087 return mQ.back();
00088 }
|
|
||||||||||
|
Definition at line 90 of file GuardedQueue.h.
00091 {
00092 Guard<Mutex> guard(mMutexGuard);
00093 mQ.push(val);
00094 }
|
|
|||||||||
|
Definition at line 96 of file GuardedQueue.h.
00097 {
00098 Guard<Mutex> guard(mMutexGuard);
00099 mQ.pop();
00100 }
|
|
|||||||||
|
Definition at line 102 of file GuardedQueue.h.
00103 {
00104 return mQ.size();
00105 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002