|
IBM SYSTEMG G RUNTIME & NATIVE STORE
0.5
IBM Native Graph Computing and Storage System based on IBM Parallel Programming Library
|
Simple thread safe queue for task management;. More...
#include <queue.h>
Inherits deque< T >.
Public Member Functions | |
| void | push_back (T elem) |
| Add an element to the end of the queue. | |
| T | pop_front (bool &valid) |
| Remove an element from the front of the queue. | |
| T | pop_back (bool &valid) |
| Remove an element from the end of the queue. | |
| size_t | size () const |
| FIXME: Number of tasks in the queue; Not thread safe. | |
Protected Attributes | |
| volatile int32_t | l |
| volatile size_t | _sz |
Private Types | |
| typedef std::deque< T > | base_type |
Simple thread safe queue for task management;.
TODO(penguin): there is a <boost/lockfree/queue.hpp> that we could try if performance becomes a bottleneck T is task* ; so we only handle pointers
1.8.6