STXXL  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::request_with_waiters Class Reference

Detailed Description

Request that is aware of threads waiting for it to complete.

Definition at line 31 of file request_with_waiters.h.

+ Inheritance diagram for stxxl::request_with_waiters:
+ Collaboration diagram for stxxl::request_with_waiters:

Protected Member Functions

bool add_waiter (onoff_switch *sw)
 
void delete_waiter (onoff_switch *sw)
 
void notify_waiters ()
 
- Protected Member Functions inherited from stxxl::request_interface
virtual void completed ()=0
 

Private Attributes

std::set< onoff_switch * > waiters
 
mutex waiters_mutex
 

Additional Inherited Members

- Public Types inherited from stxxl::request_interface
typedef stxxl::external_size_type offset_type
 
enum  request_type { READ, WRITE }
 
typedef stxxl::internal_size_type size_type
 
- Public Member Functions inherited from stxxl::request_interface
virtual ~request_interface ()
 
virtual bool cancel ()=0
 Cancel a request. More...
 
virtual const char * io_type () const =0
 Identifies the type of I/O implementation. More...
 
virtual bool poll ()=0
 Polls the status of the request. More...
 
virtual std::ostream & print (std::ostream &out) const =0
 Dumps properties of a request. More...
 
virtual void serve ()=0
 
virtual void wait (bool measure_time=true)=0
 Suspends calling thread until completion of the request. More...
 

Member Function Documentation

bool stxxl::request_with_waiters::add_waiter ( onoff_switch sw)
protectedvirtual

Implements stxxl::request_interface.

Definition at line 25 of file request_with_waiters.cpp.

void stxxl::request_with_waiters::delete_waiter ( onoff_switch sw)
protectedvirtual

Implements stxxl::request_interface.

Definition at line 43 of file request_with_waiters.cpp.

void stxxl::request_with_waiters::notify_waiters ( )
protectedvirtual

Implements stxxl::request_interface.

Definition at line 49 of file request_with_waiters.cpp.

References _STXXL_FORCE_SEQUENTIAL, and stxxl::for_each().

Member Data Documentation

std::set<onoff_switch*> stxxl::request_with_waiters::waiters
private

Definition at line 34 of file request_with_waiters.h.

mutex stxxl::request_with_waiters::waiters_mutex
private

Definition at line 33 of file request_with_waiters.h.


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