You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
386 B
C

#ifndef POOL_H
#define POOL_H
#include <hiredis/async.h>
struct conf;
struct worker;
struct pool {
struct worker *w;
struct conf *cfg;
const redisAsyncContext **ac;
int count;
int cur;
};
struct pool *
pool_new(struct worker *w, int count);
redisAsyncContext *
pool_connect(struct pool *p, int attach);
const redisAsyncContext *
pool_get_context(struct pool *p);
#endif