Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
request_queue_impl_worker Class Reference

Detailed Description

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 34 of file request_queue_impl_worker.hpp.

+ Inheritance diagram for request_queue_impl_worker:
+ Collaboration diagram for request_queue_impl_worker:

#include <request_queue_impl_worker.hpp>

Protected Types

enum  thread_state { NOT_RUNNING, RUNNING, TERMINATING, TERMINATED }
 

Protected Member Functions

void start_thread (void *(*worker)(void *), void *arg, std::thread &t, shared_state< thread_state > &s)
 
void stop_thread (std::thread &t, shared_state< thread_state > &s, tlx::semaphore &sem)
 

Additional Inherited Members

- Public Types inherited from request_queue
enum  priority_op { READ, WRITE, NONE }
 
- Public Member Functions inherited from request_queue
 request_queue ()=default
 
 request_queue (const request_queue &)=delete
 non-copyable: delete copy-constructor More...
 
 request_queue (request_queue &&)=default
 move-constructor: default More...
 
virtual ~request_queue ()
 
virtual void add_request (request_ptr &req)=0
 
virtual bool cancel_request (request_ptr &req)=0
 
request_queueoperator= (const request_queue &)=delete
 non-copyable: delete assignment operator More...
 
request_queueoperator= (request_queue &&)=default
 move-assignment operator: default More...
 
virtual void set_priority_op (const priority_op &p)
 

Member Enumeration Documentation

enum thread_state
protected
Enumerator
NOT_RUNNING 
RUNNING 
TERMINATING 
TERMINATED 

Definition at line 37 of file request_queue_impl_worker.hpp.

Member Function Documentation

void start_thread ( void *(*)(void *)  worker,
void *  arg,
std::thread &  t,
shared_state< thread_state > &  s 
)
protected

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