CernVM-FS
2.12.0
|
#include <concurrency.h>
Public Member Functions | |
Channel () | |
~Channel () | |
std::vector< ItemT * > * | StartEnqueueing () |
void | AbortEnqueueing () |
void | CommitEnqueueing () |
void | PushBack (ItemT *item) |
ItemT * | PopFront () |
Private Attributes | |
std::vector< ItemT * > | items_ |
pthread_mutex_t | lock_ |
pthread_cond_t | cond_populated_ |
Additional Inherited Members | |
Private Member Functions inherited from SingleCopy | |
SingleCopy () | |
This file is part of the CernVM File System. A thread-safe, unbounded vector of items that implement a FIFO channel. Uses conditional variables to block when threads try to pop from the empty channel.
Definition at line 31 of file concurrency.h.
Definition at line 33 of file concurrency.h.
Definition at line 40 of file concurrency.h.
|
inline |
Unlocks the queue. The queue must remain unchanged when this is called.
Definition at line 57 of file concurrency.h.
|
inline |
1 new item was added to the queue. Unlock and signal to reader thread.
Definition at line 65 of file concurrency.h.
|
inline |
Remove and return the first element from the queue. Block if tube is empty.
Definition at line 83 of file concurrency.h.
|
inline |
Definition at line 72 of file concurrency.h.
|
inline |
Returns the queue locked and ready for appending 1 item.
Definition at line 48 of file concurrency.h.
|
private |
Signals if there are items enqueued
Definition at line 104 of file concurrency.h.
|
private |
The locked queue/channel
Definition at line 96 of file concurrency.h.
|
private |
Protects all internal state
Definition at line 100 of file concurrency.h.