Skip to content

Commit

Permalink
Change thread number into #define
Browse files Browse the repository at this point in the history
  • Loading branch information
uoo723 committed Jun 23, 2017
1 parent b7c988d commit e929248
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
#include "node.h"
#include "thpool.h"

#define THREAD 4

typedef threadpool threadpool_t;

typedef struct {
unsigned int key;
char value[VALUESIZE];
} args_t;

static int thread_num = 4;

static key_t key_id;

static hashtable_t *hashtable;
Expand Down Expand Up @@ -53,7 +53,7 @@ void server() {
exit(0);
}

if ((thpool = thpool_init(thread_num)) == NULL) {
if ((thpool = thpool_init(THREAD)) == NULL) {
perror("thpool is null ");
exit(0);
}
Expand Down

0 comments on commit e929248

Please sign in to comment.