summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2016-07-18 14:42:10 -0700
committerdormando <dormando@rydia.net>2016-08-19 17:34:55 -0700
commitc793bae62ebbf9b0c2b0663fcbd33684262e3062 (patch)
tree69c64cd77b48acf033678644eafe1111ed28cdd7 /thread.c
parentcca7bcab6e279f1edd22052635dc6080ea78e984 (diff)
downloadmemcached-c793bae62ebbf9b0c2b0663fcbd33684262e3062.tar.gz
remove some dead thread code
is_listen_thread() was removed from service after the new listen sockets were added. this removes the rest of the code.
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/thread.c b/thread.c
index d8dda27..757dd8f 100644
--- a/thread.c
+++ b/thread.c
@@ -62,8 +62,6 @@ unsigned int item_lock_hashpower;
#define hashsize(n) ((unsigned long int)1<<(n))
#define hashmask(n) (hashsize(n)-1)
-static LIBEVENT_DISPATCHER_THREAD dispatcher_thread;
-
/*
* Each libevent instance has a wakeup pipe, which other threads
* can use to signal that they've put a new connection on its queue.
@@ -522,13 +520,6 @@ void sidethread_conn_close(conn *c) {
return;
}
-/*
- * Returns true if this is the thread that listens for new TCP connections.
- */
-int is_listen_thread() {
- return pthread_self() == dispatcher_thread.thread_id;
-}
-
/********************************* ITEM ACCESS *******************************/
/*
@@ -720,9 +711,8 @@ void slab_stats_aggregate(struct thread_stats *stats, struct slab_stats *out) {
* Initializes the thread subsystem, creating various worker threads.
*
* nthreads Number of worker event handler threads to spawn
- * main_base Event base for main thread
*/
-void memcached_thread_init(int nthreads, struct event_base *main_base) {
+void memcached_thread_init(int nthreads) {
int i;
int power;
@@ -774,9 +764,6 @@ void memcached_thread_init(int nthreads, struct event_base *main_base) {
exit(1);
}
- dispatcher_thread.base = main_base;
- dispatcher_thread.thread_id = pthread_self();
-
for (i = 0; i < nthreads; i++) {
int fds[2];
if (pipe(fds)) {