Thrill  0.1

Classes

class  disk_queues
 
class  request
 Request object encapsulating basic properties like file and offset. More...
 
class  request_interface
 
class  request_queue
 Interface of a request_queue to which requests can be added and canceled. More...
 
class  request_queue_impl_1q
 
class  request_queue_impl_qwqr
 
class  request_queue_impl_worker
 
class  request_with_state
 Request with completion shared_state. More...
 
class  request_with_waiters
 Request that is aware of threads waiting for it to complete. More...
 
class  serving_request
 Request which serves an I/O by calling the synchronous routine of the file. More...
 

Typedefs

using completion_handler = tlx::delegate< void(request *r, bool success)>
 completion handler More...
 
using file_ptr = tlx::counting_ptr< file >
 A reference counting pointer for file. More...
 
using request_ptr = tlx::counting_ptr< request >
 A reference counting pointer for request. More...
 

Functions

template<class RequestIterator >
std::iterator_traits< RequestIterator >::difference_type cancel_all (RequestIterator reqs_begin, RequestIterator reqs_end)
 
std::ostream & operator<< (std::ostream &out, const request &req)
 
template<class RequestIterator >
RequestIterator poll_any (RequestIterator reqs_begin, RequestIterator reqs_end)
 
static bool poll_any (request_ptr req_array[], size_t count, size_t &index)
 
template<class 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 (request_ptr req_array[], size_t count)
 
template<class RequestIterator >
RequestIterator wait_any (RequestIterator reqs_begin, RequestIterator reqs_end)
 
static size_t wait_any (request_ptr req_array[], size_t count)
 

Variables

constexpr size_t BlockAlignment = 4096
 

Detailed Description

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

Typedef Documentation

◆ completion_handler

using completion_handler = tlx::delegate<void(request* r, bool success)>

completion handler

Definition at line 46 of file request.hpp.

◆ file_ptr

A reference counting pointer for file.

Definition at line 265 of file file.hpp.

◆ request_ptr

A reference counting pointer for request.

Definition at line 43 of file request.hpp.

Function Documentation

◆ cancel_all()

std::iterator_traits<RequestIterator>::difference_type foxxll::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.

◆ operator<<()

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

Definition at line 103 of file request.cpp.

References request::print().

◆ poll_any() [1/2]

RequestIterator foxxll::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 74 of file request_operations.hpp.

Referenced by foxxll::poll_any().

◆ poll_any() [2/2]

static bool foxxll::poll_any ( request_ptr  req_array[],
size_t  count,
size_t &  index 
)
inlinestatic

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 92 of file request_operations.hpp.

References foxxll::poll_any().

◆ wait_all() [1/2]

void foxxll::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 33 of file request_operations.hpp.

Referenced by foxxll::wait_all().

◆ wait_all() [2/2]

static void foxxll::wait_all ( request_ptr  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 42 of file request_operations.hpp.

References foxxll::wait_all().

◆ wait_any() [1/2]

RequestIterator foxxll::wait_any ( RequestIterator  reqs_begin,
RequestIterator  reqs_end 
)

Suspends calling thread until any of requests is completed.

Parameters
reqs_beginbegin of request sequence to wait for
reqs_endend of request sequence to wait for
Returns
index in req_array pointing to the first completed request

Definition at line 104 of file request_operations.hpp.

References onoff_switch::wait_for_on(), and stats::WAIT_OP_ANY.

Referenced by buffered_writer< block_type >::get_free_block(), write_pool< BlockType >::steal(), and foxxll::wait_any().

◆ wait_any() [2/2]

static size_t foxxll::wait_any ( request_ptr  req_array[],
size_t  count 
)
inlinestatic

Suspends calling thread until any of requests is completed.

Parameters
req_arrayarray of request_ptr objects
countsize of req_array
Returns
index in req_array pointing to the first completed request

Definition at line 150 of file request_operations.hpp.

References foxxll::wait_any().

Variable Documentation

◆ BlockAlignment