Thrill
0.1
|
A BlockSource to read Block from a BlockQueue using a BlockReader.
Each Block is taken from the BlockQueue, hence the BlockQueue can be read only once!
Definition at line 233 of file block_queue.hpp.
#include <block_queue.hpp>
Public Member Functions | |
ConsumeBlockQueueSource (BlockQueue &queue, size_t local_worker_id) | |
Start reading from a BlockQueue. More... | |
PinnedBlock | NextBlock () |
void | Prefetch (size_t) |
Private Attributes | |
size_t | local_worker_id_ |
local worker id of the thread reading the BlockQueue More... | |
BlockQueue & | queue_ |
BlockQueue that blocks are retrieved from. More... | |
Static Private Attributes | |
static constexpr bool | debug = BlockQueue::debug |
|
explicit |
Start reading from a BlockQueue.
Definition at line 92 of file block_queue.cpp.
PinnedBlock NextBlock | ( | ) |
Advance to next block of file, delivers current_ and end_ for BlockReader. Returns false if the source is empty.
Definition at line 100 of file block_queue.cpp.
References ConsumeBlockQueueSource::local_worker_id_, LOG, PinnedBlock::PinWait(), BlockQueue::Pop(), and ConsumeBlockQueueSource::queue_.
void Prefetch | ( | size_t | ) |
Definition at line 96 of file block_queue.cpp.
|
staticprivate |
Definition at line 235 of file block_queue.hpp.
|
private |
local worker id of the thread reading the BlockQueue
Definition at line 252 of file block_queue.hpp.
Referenced by ConsumeBlockQueueSource::NextBlock().
|
private |
BlockQueue that blocks are retrieved from.
Definition at line 249 of file block_queue.hpp.
Referenced by ConsumeBlockQueueSource::NextBlock().