Defines interface of request. More...
#include <iobase.h>
Public Member Functions | |
virtual void | wait ()=0 |
Suspends calling thread until completion of the request. | |
virtual bool | poll ()=0 |
Polls the status of the request. | |
virtual const char * | io_type () |
Identifies the type of request I/O implementation. | |
void | error_occured (const char *msg) |
Inform the request object that an error occurred during the I/O execution. | |
void | error_occured (const std::string &msg) |
Inform the request object that an error occurred during the I/O execution. | |
void | check_errors () throw (stxxl::io_error) |
Rises an exception if there were error with the I/O. | |
Friends | |
int | wait_any (request_ptr req_array[], int count) |
Collection of functions to track statuses of a number of requests. |
Defines interface of request.
Since all library I/O operations are asynchronous, one needs to keep track of their status: whether an I/O completed or not.
void request::check_errors | ( | ) | throw (stxxl::io_error) [inline] |
Rises an exception if there were error with the I/O.
Referenced by ufs_request_base::poll(), mem_request::poll(), ufs_request_base::wait(), and mem_request::wait().
void request::error_occured | ( | const std::string & | msg | ) | [inline] |
Inform the request object that an error occurred during the I/O execution.
void request::error_occured | ( | const char * | msg | ) | [inline] |
Inform the request object that an error occurred during the I/O execution.
virtual const char* request::io_type | ( | ) | [inline, virtual] |
Identifies the type of request I/O implementation.
Reimplemented in mem_request, mmap_request, sim_disk_request, syscall_request, and ufs_request_base.
virtual bool request::poll | ( | ) | [pure virtual] |
Polls the status of the request.
true
if request is completed, otherwise false
Implemented in mem_request, and ufs_request_base.
virtual void request::wait | ( | ) | [pure virtual] |
Suspends calling thread until completion of the request.
Implemented in mem_request, and ufs_request_base.
int wait_any | ( | request_ptr | req_array[], | |
int | count | |||
) | [friend] |
Collection of functions to track statuses of a number of requests.
Suspends calling thread until any of requests is completed
req_array | array of request_ptr objects | |
count | size of req_array |