STXXL
1.4-dev
|
Implementation of request queue worker threads. Worker threads can be started by start_thread and stopped with stop_thread. The queue state is checked before termination and updated afterwards.
Definition at line 43 of file request_queue_impl_worker.h.
Protected Types | |
enum | thread_state { NOT_RUNNING, RUNNING, TERMINATING, TERMINATED } |
typedef pthread_t | thread_type |
Protected Member Functions | |
void | start_thread (void *(*worker)(void *), void *arg, thread_type &t, state< thread_state > &s) |
void | stop_thread (thread_type &t, state< thread_state > &s, semaphore &sem) |
Additional Inherited Members | |
Public Types inherited from stxxl::request_queue | |
enum | priority_op { READ, WRITE, NONE } |
Public Member Functions inherited from stxxl::request_queue | |
virtual | ~request_queue () noexcept(false) |
virtual void | add_request (request_ptr &req)=0 |
virtual bool | cancel_request (request_ptr &req)=0 |
virtual void | set_priority_op (priority_op p) |
|
protected |
Definition at line 53 of file request_queue_impl_worker.h.
|
protected |
Enumerator | |
---|---|
NOT_RUNNING | |
RUNNING | |
TERMINATING | |
TERMINATED |
Definition at line 46 of file request_queue_impl_worker.h.
|
protected |
Definition at line 35 of file request_queue_impl_worker.cpp.
References stxxl::state< ValueType >::set_to(), and STXXL_CHECK_PTHREAD_CALL.
Referenced by stxxl::linuxaio_queue::linuxaio_queue(), stxxl::request_queue_impl_1q::request_queue_impl_1q(), and stxxl::request_queue_impl_qwqr::request_queue_impl_qwqr().
|
protected |
Definition at line 48 of file request_queue_impl_worker.cpp.
References stxxl::state< ValueType >::set_to(), and STXXL_CHECK_PTHREAD_CALL.
Referenced by stxxl::linuxaio_queue::~linuxaio_queue(), stxxl::request_queue_impl_1q::~request_queue_impl_1q(), and stxxl::request_queue_impl_qwqr::~request_queue_impl_qwqr().