Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
I/O Requests and Queues
+ Collaboration diagram for I/O Requests and Queues:

Classes

class  BadExternalAlloc
 
class  DiskQueues
 
class  IoError
 
class  LinuxaioQueue
 
class  LinuxaioRequest
 Request for an linuxaio_file. More...
 
class  Request
 Request object encapsulating basic properties like file and offset. More...
 
class  RequestDeleter
 deleter for Requests which are allocated from mem::g_pool. More...
 
class  RequestQueue
 Interface of a request_queue to which requests can be added and canceled. More...
 
class  RequestQueueImpl1Q
 
class  RequestQueueImplQwQr
 
class  RequestQueueImplWorker
 
class  ServingRequest
 Request which serves an I/O by calling the synchronous routine of the file. More...
 

Typedefs

using CompletionHandler = tlx::delegate< void(Request *, bool)>
 
using RequestPtr = tlx::CountingPtr< Request, RequestDeleter >
 A reference counting pointer for request. More...
 

Functions

template<typename RequestIterator >
std::iterator_traits
< RequestIterator >
::difference_type 
cancel_all (RequestIterator reqs_begin, RequestIterator reqs_end)
 
std::ostream & operator<< (std::ostream &out, const Request &req)
 make Request ostreamable More...
 
template<typename RequestIterator >
RequestIterator poll_any (RequestIterator reqs_begin, RequestIterator reqs_end)
 
bool poll_any (RequestPtr req_array[], size_t count, size_t &index)
 
template<typename RequestIterator >
void wait_all (RequestIterator reqs_begin, RequestIterator reqs_end)
 Collection of functions to track statuses of a number of requests. More...
 
static void wait_all (RequestPtr req_array[], size_t count)
 

Detailed Description

Encapsulation of an I/O request, queues for requests and threads to process them.

Typedef Documentation

using CompletionHandler = tlx::delegate<void(Request*, bool)>

Definition at line 41 of file request.hpp.

using RequestPtr = tlx::CountingPtr<Request, RequestDeleter>

A reference counting pointer for request.

Definition at line 198 of file request.hpp.

Function Documentation

std::iterator_traits<RequestIterator>::difference_type thrill::io::cancel_all ( RequestIterator  reqs_begin,
RequestIterator  reqs_end 
)

Cancel requests. The specified requests are canceled unless already being processed. However, cancelation cannot be guaranteed. Cancelled requests must still be waited for in order to ensure correct operation.

Parameters
reqs_beginbegin of request sequence
reqs_endend of request sequence
Returns
number of request canceled

Definition at line 57 of file request_operations.hpp.

std::ostream & operator<< ( std::ostream &  out,
const Request &  req 
)

make Request ostreamable

Definition at line 94 of file request.cpp.

References Request::print().

RequestIterator thrill::io::poll_any ( RequestIterator  reqs_begin,
RequestIterator  reqs_end 
)

Polls requests.

Parameters
reqs_beginbegin of request sequence to poll
reqs_endend of request sequence to poll
Returns
true if any of requests is completed, then index contains valid value, otherwise false

Definition at line 73 of file request_operations.hpp.

Referenced by thrill::io::poll_any().

bool thrill::io::poll_any ( RequestPtr  req_array[],
size_t  count,
size_t &  index 
)
inline

Polls requests.

Parameters
req_arrayarray of request_ptr objects
countsize of req_array
indexcontains index of the first completed request if any
Returns
true if any of requests is completed, then index contains valid value, otherwise false

Definition at line 89 of file request_operations.hpp.

References thrill::io::poll_any().

void thrill::io::wait_all ( RequestIterator  reqs_begin,
RequestIterator  reqs_end 
)

Collection of functions to track statuses of a number of requests.

Suspends calling thread until all given requests are completed.

Parameters
reqs_beginbegin of request sequence to wait for
reqs_endend of request sequence to wait for

Definition at line 35 of file request_operations.hpp.

Referenced by thrill::io::wait_all().

static void thrill::io::wait_all ( RequestPtr  req_array[],
size_t  count 
)
inlinestatic

Suspends calling thread until all given requests are completed.

Parameters
req_arrayarray of request_ptr objects
countsize of req_array

Definition at line 43 of file request_operations.hpp.

References thrill::io::wait_all().