Thrill  0.1
PinRequest Class Reference

Detailed Description

Definition at line 331 of file block.hpp.

+ Inheritance diagram for PinRequest:
+ Collaboration diagram for PinRequest:

#include <block.hpp>

Public Member Functions

ByteBlockPtrbyte_block ()
 
bool ready () const
 whether the read is completed, cannot block. More...
 
PinnedBlock Wait ()
 wait and get the PinnedBlock. this may block until the read is complete. More...
 
- Public Member Functions inherited from ReferenceCounter
 ReferenceCounter () noexcept
 new objects have zero reference count More...
 
 ReferenceCounter (const ReferenceCounter &) noexcept
 coping still creates a new object with zero reference count More...
 
 ~ReferenceCounter ()
 
bool dec_reference () const noexcept
 Call whenever resetting (i.e. More...
 
void inc_reference () const noexcept
 Call whenever setting a pointer to the object. More...
 
ReferenceCounteroperator= (const ReferenceCounter &) noexcept
 assignment operator, leaves pointers unchanged More...
 
size_t reference_count () const noexcept
 Return the number of references to this object (for debugging) More...
 
bool unique () const noexcept
 Test if the ReferenceCounter is referenced by only one CountingPtr. More...
 

Private Member Functions

 PinRequest (BlockPool *block_pool, PinnedBlock &&block, bool ready=true)
 
void OnComplete (foxxll::request *req, bool success)
 calls BlockPool::OnReadComplete used to tlx::delegate More...
 

Private Attributes

PinnedBlock block_
 
BlockPoolblock_pool_
 reference back to BlockPool More...
 
std::atomic< bool > ready_
 indication that the PinnedBlocks ready More...
 
foxxll::request_ptr req_
 running read request More...
 

Constructor & Destructor Documentation

◆ PinRequest()

PinRequest ( BlockPool block_pool,
PinnedBlock &&  block,
bool  ready = true 
)
inlineprivate

Definition at line 346 of file block.hpp.

Member Function Documentation

◆ byte_block()

ByteBlockPtr& byte_block ( )
inline

Definition at line 340 of file block.hpp.

Referenced by BlockPool::OnReadComplete().

◆ OnComplete()

void OnComplete ( foxxll::request req,
bool  success 
)
private

calls BlockPool::OnReadComplete used to tlx::delegate

Definition at line 719 of file block_pool.cpp.

Referenced by BlockPool::PinBlock().

◆ ready()

bool ready ( ) const
inline

whether the read is completed, cannot block.

Definition at line 338 of file block.hpp.

◆ Wait()

PinnedBlock Wait ( )

wait and get the PinnedBlock. this may block until the read is complete.

Definition at line 64 of file block.cpp.

Member Data Documentation

◆ block_

PinnedBlock block_
private

pinned block which will be returned, this PinnedBlock may already be partially initialized for the read!

Definition at line 353 of file block.hpp.

Referenced by BlockPool::OnReadComplete().

◆ block_pool_

BlockPool* block_pool_
private

reference back to BlockPool

Definition at line 350 of file block.hpp.

◆ ready_

std::atomic<bool> ready_
private

indication that the PinnedBlocks ready

Definition at line 358 of file block.hpp.

Referenced by BlockPool::OnReadComplete().

◆ req_

foxxll::request_ptr req_
private

running read request

Definition at line 355 of file block.hpp.


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