Grappa  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Grappa::ThreadQueue Class Reference

A queue of threads. More...

#include <ThreadQueue.hpp>

Public Member Functions

std::ostream & dump (std::ostream &o) const
 
 ThreadQueue ()
 
void enqueue (Worker *t)
 Add a Worker to the queue. More...
 
Workerdequeue ()
 Remove a Worker from the queue and return it. More...
 
WorkerdequeueLazy ()
 Remove a Worker from the queue and return it. More...
 
Workerfront () const
 Peek at the head of the queue. More...
 
void prefetch () const
 
uint64_t length () const
 
bool empty ()
 

Detailed Description

A queue of threads.

Definition at line 35 of file ThreadQueue.hpp.

Constructor & Destructor Documentation

Grappa::ThreadQueue::ThreadQueue ( )
inline

Definition at line 48 of file ThreadQueue.hpp.

Member Function Documentation

Worker * Grappa::ThreadQueue::dequeue ( )
inline

Remove a Worker from the queue and return it.

Definition at line 186 of file ThreadQueue.hpp.

Worker * Grappa::ThreadQueue::dequeueLazy ( )
inline

Remove a Worker from the queue and return it.

Does not change the links of the returned Worker.

Definition at line 201 of file ThreadQueue.hpp.

std::ostream& Grappa::ThreadQueue::dump ( std::ostream &  o) const
inline

Definition at line 42 of file ThreadQueue.hpp.

bool Grappa::ThreadQueue::empty ( )
inline

Definition at line 62 of file ThreadQueue.hpp.

void Grappa::ThreadQueue::enqueue ( Worker t)
inline

Add a Worker to the queue.

Definition at line 217 of file ThreadQueue.hpp.

Worker * Grappa::ThreadQueue::front ( ) const
inline

Peek at the head of the queue.

Definition at line 229 of file ThreadQueue.hpp.

uint64_t Grappa::ThreadQueue::length ( ) const
inline

Definition at line 58 of file ThreadQueue.hpp.

void Grappa::ThreadQueue::prefetch ( ) const

The documentation for this class was generated from the following file: