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 |
Encapsulation of an I/O request, queues for requests and threads to process them.
using completion_handler = tlx::delegate<void(request* r, bool success)> |
completion handler
Definition at line 46 of file request.hpp.
typedef tlx::counting_ptr< file > file_ptr |
using request_ptr = tlx::counting_ptr<request> |
A reference counting pointer for request
.
Definition at line 43 of file request.hpp.
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.
reqs_begin | begin of request sequence |
reqs_end | end of request sequence |
Definition at line 57 of file request_operations.hpp.
std::ostream & operator<< | ( | std::ostream & | out, |
const request & | req | ||
) |
Definition at line 103 of file request.cpp.
References request::print().
RequestIterator foxxll::poll_any | ( | RequestIterator | reqs_begin, |
RequestIterator | reqs_end | ||
) |
Polls requests.
reqs_begin | begin of request sequence to poll |
reqs_end | end of request sequence to poll |
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().
|
inlinestatic |
Polls requests.
req_array | array of request_ptr objects |
count | size of req_array |
index | contains index of the first completed request if any |
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().
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.
reqs_begin | begin of request sequence to wait for |
reqs_end | end of request sequence to wait for |
Definition at line 33 of file request_operations.hpp.
Referenced by foxxll::wait_all().
|
inlinestatic |
Suspends calling thread until all given requests are completed.
req_array | array of request_ptr objects |
count | size of req_array |
Definition at line 42 of file request_operations.hpp.
References foxxll::wait_all().
RequestIterator foxxll::wait_any | ( | RequestIterator | reqs_begin, |
RequestIterator | reqs_end | ||
) |
Suspends calling thread until any of requests is completed.
reqs_begin | begin of request sequence to wait for |
reqs_end | end of request sequence to wait for |
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().
|
inlinestatic |
Suspends calling thread until any of requests is completed.
req_array | array of request_ptr objects |
count | size of req_array |
Definition at line 150 of file request_operations.hpp.
References foxxll::wait_any().
constexpr size_t BlockAlignment = 4096 |
Definition at line 34 of file request.hpp.
Referenced by request::check_alignment(), memory_file::discard(), fileperblock_file< base_file_type >::lock(), and typed_block< RawSize, Type, NRef, MetaInfoType >::typed_block().