Thrill  0.1
ConsumeBlockQueueSource Class Reference

Detailed Description

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.

+ Collaboration diagram for ConsumeBlockQueueSource:

#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...
 
BlockQueuequeue_
 BlockQueue that blocks are retrieved from. More...
 

Static Private Attributes

static constexpr bool debug = BlockQueue::debug
 

Constructor & Destructor Documentation

◆ ConsumeBlockQueueSource()

ConsumeBlockQueueSource ( BlockQueue queue,
size_t  local_worker_id 
)
explicit

Start reading from a BlockQueue.

Definition at line 92 of file block_queue.cpp.

Member Function Documentation

◆ NextBlock()

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_.

◆ Prefetch()

void Prefetch ( size_t  )

Definition at line 96 of file block_queue.cpp.

Member Data Documentation

◆ debug

constexpr bool debug = BlockQueue::debug
staticprivate

Definition at line 235 of file block_queue.hpp.

◆ local_worker_id_

size_t local_worker_id_
private

local worker id of the thread reading the BlockQueue

Definition at line 252 of file block_queue.hpp.

Referenced by ConsumeBlockQueueSource::NextBlock().

◆ queue_

BlockQueue& queue_
private

BlockQueue that blocks are retrieved from.

Definition at line 249 of file block_queue.hpp.

Referenced by ConsumeBlockQueueSource::NextBlock().


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