diff options
| author | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2013-12-15 11:49:02 +0100 |
|---|---|---|
| committer | Paul Buetow (mars.fritz.box) <paul@buetow.org> | 2013-12-15 11:49:02 +0100 |
| commit | 3a96ab7e91145b367d05e98533b5f426f762f83f (patch) | |
| tree | ac7758a706066e14b785ab6e5f7071a54baa856b /yhttpd/src/thrd/pool.h | |
| parent | 332d7b2107833018b3ef67b64ffe121bff1ef4fb (diff) | |
add packagespackages
Diffstat (limited to 'yhttpd/src/thrd/pool.h')
| -rw-r--r-- | yhttpd/src/thrd/pool.h | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/yhttpd/src/thrd/pool.h b/yhttpd/src/thrd/pool.h deleted file mode 100644 index 3a5f7b6..0000000 --- a/yhttpd/src/thrd/pool.h +++ /dev/null @@ -1,55 +0,0 @@ -#include "../incl.h" - -#ifndef POOL_H -#define POOL_H - -#include <queue> - -using namespace std; - -class pool -{ -private: - friend class thro; - - struct task - { - void(*p_func)(void*); - void *p_void; - - task(void(*p_func)(void*), void *p_void) - { - this->p_func = p_func; - this->p_void = p_void; - } - }; - - pthread_mutex_t mut_threads; - pthread_mutex_t mut_queue_tasks; - pthread_mutex_t mut_num_avail_threads; - pthread_cond_t cond_new_task; - - int i_num_avail_threads; - int i_num_total_threads; - - queue<task*> queue_tasks; - - int increase_pool(int i_num); - void add_task( void(*p_func)(void*), void* p_void ); - static void* wait_for_task(void *p_void); - static void run_func(void *p_void); - -public: - pool(); - ~pool(); - - void run(void* p_void); - bool allow_user_login(); - -#ifdef NCURSES - - void print_pool_size(); -#endif -}; - -#endif |
