![]() |
UltraGrid
UltraGrid Low-Latency High-Resolution Transmission System
|
This class represents a worker that is called from within the pool. More...

Public Member Functions | |
| wp_worker (worker_state_observer &observer) | |
| ~wp_worker () | |
| void * | pop (wp_task_data *) |
| void | push (wp_task_data *) |
| void | run () |
Static Public Member Functions | |
| static void * | enter_loop (void *args) |
Public Attributes | |
| queue< wp_task_data * > | m_data |
| pthread_mutex_t | m_lock |
| worker_state_observer & | m_state_observer |
| pthread_cond_t | m_task_completed_cv |
| pthread_cond_t | m_task_ready_cv |
| pthread_t | m_thread_id |
This class represents a worker that is called from within the pool.
Definition at line 79 of file worker.cpp.
|
inline |
Definition at line 80 of file worker.cpp.
References enter_loop(), m_lock, m_task_completed_cv, m_task_ready_cv, and m_thread_id.

|
inline |
Definition at line 94 of file worker.cpp.
References m_lock, m_task_completed_cv, m_task_ready_cv, m_thread_id, and push().

|
static |
Definition at line 118 of file worker.cpp.
References instance, and set_thread_name().
Referenced by wp_worker().

| void * wp_worker::pop | ( | wp_task_data * | d | ) |
Definition at line 165 of file worker.cpp.
References m_lock, wp_task_data::m_result, wp_task_data::m_returned, and m_task_completed_cv.
Referenced by worker_pool::wait_task().
| void wp_worker::push | ( | wp_task_data * | data | ) |
Definition at line 157 of file worker.cpp.
References m_data, m_lock, and m_task_ready_cv.
Referenced by ~wp_worker(), and worker_pool::run_async().
| void wp_worker::run | ( | ) |
Definition at line 126 of file worker.cpp.
References wp_task_data::m_data, m_data, wp_task_data::m_detached, m_lock, wp_task_data::m_result, wp_task_data::m_returned, m_state_observer, wp_task_data::m_task, m_task_completed_cv, m_task_ready_cv, and worker_state_observer::notify().

| queue<wp_task_data*> wp_worker::m_data |
Definition at line 109 of file worker.cpp.
| pthread_mutex_t wp_worker::m_lock |
Definition at line 110 of file worker.cpp.
Referenced by wp_worker(), ~wp_worker(), pop(), push(), and run().
| worker_state_observer& wp_worker::m_state_observer |
Definition at line 115 of file worker.cpp.
Referenced by run().
| pthread_cond_t wp_worker::m_task_completed_cv |
Definition at line 112 of file worker.cpp.
Referenced by wp_worker(), ~wp_worker(), pop(), and run().
| pthread_cond_t wp_worker::m_task_ready_cv |
Definition at line 111 of file worker.cpp.
Referenced by wp_worker(), ~wp_worker(), push(), and run().
| pthread_t wp_worker::m_thread_id |
Definition at line 113 of file worker.cpp.
Referenced by wp_worker(), and ~wp_worker().