summaryrefslogtreecommitdiff
path: root/src/thrd
diff options
context:
space:
mode:
Diffstat (limited to 'src/thrd')
-rw-r--r--src/thrd/CVS/Entries5
-rw-r--r--src/thrd/CVS/Repository1
-rw-r--r--src/thrd/CVS/Root1
-rwxr-xr-xsrc/thrd/pool.cpp9
-rwxr-xr-xsrc/thrd/pool.h7
5 files changed, 15 insertions, 8 deletions
diff --git a/src/thrd/CVS/Entries b/src/thrd/CVS/Entries
new file mode 100644
index 0000000..bb6bf86
--- /dev/null
+++ b/src/thrd/CVS/Entries
@@ -0,0 +1,5 @@
+/pool.cpp/1.17/Fri Feb 25 01:22:35 2005//
+/pool.h/1.12/Sun Mar 6 20:44:47 2005//
+/thro.cpp/1.7/Sun Mar 6 20:44:47 2005//
+/thro.h/1.6/Sun Mar 6 20:44:47 2005//
+D
diff --git a/src/thrd/CVS/Repository b/src/thrd/CVS/Repository
new file mode 100644
index 0000000..058942a
--- /dev/null
+++ b/src/thrd/CVS/Repository
@@ -0,0 +1 @@
+ychat/src/thrd
diff --git a/src/thrd/CVS/Root b/src/thrd/CVS/Root
new file mode 100644
index 0000000..745de68
--- /dev/null
+++ b/src/thrd/CVS/Root
@@ -0,0 +1 @@
+:pserver:anonymous@buetow.org:/usr/home/cvs/cvsroot
diff --git a/src/thrd/pool.cpp b/src/thrd/pool.cpp
index dd29d6a..1f4ace6 100755
--- a/src/thrd/pool.cpp
+++ b/src/thrd/pool.cpp
@@ -14,7 +14,7 @@ pool::pool()
i_num_total_threads = 0;
i_num_avail_threads = tool::string2int( wrap::CONF->get_elem( "httpd.thread.initpoolsize" ) );
- increase_pool(i_num_avail_threads);
+ increase_pool(i_num_avail_threads);
}
pool::~pool()
@@ -91,10 +91,10 @@ pool::wait_for_task( void* p_void )
}
pthread_mutex_unlock(&p_pool->mut_num_avail_threads);
- pthread_mutex_lock(&p_pool->mut_queue_tasks);
+ pthread_mutex_lock(&p_pool->mut_queue_tasks);
task* p_task = p_pool->queue_tasks.front();
p_pool->queue_tasks.pop();
- pthread_mutex_unlock(&p_pool->mut_queue_tasks);
+ pthread_mutex_unlock(&p_pool->mut_queue_tasks);
pthread_mutex_unlock(&p_pool->mut_threads);
@@ -118,8 +118,9 @@ pool::run(void* p_void)
void
pool::run_func(void *p_void)
{
- socketcontainer* p_sock = static_cast<socketcontainer*>(p_void);
+ int* p_sock = static_cast<int*>(p_void);
wrap::SOCK->read_write(p_sock);
+ delete p_sock;
}
bool
diff --git a/src/thrd/pool.h b/src/thrd/pool.h
index 3a5f7b6..ab03b57 100755
--- a/src/thrd/pool.h
+++ b/src/thrd/pool.h
@@ -7,7 +7,7 @@
using namespace std;
-class pool
+class pool
{
private:
friend class thro;
@@ -22,7 +22,7 @@ private:
this->p_func = p_func;
this->p_void = p_void;
}
- };
+ };
pthread_mutex_t mut_threads;
pthread_mutex_t mut_queue_tasks;
@@ -43,11 +43,10 @@ public:
pool();
~pool();
- void run(void* p_void);
+ void run(void* p_void);
bool allow_user_login();
#ifdef NCURSES
-
void print_pool_size();
#endif
};