Commit 56abe23f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use the worker pools in round-robin fashion.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1049 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f490fa7c
......@@ -238,9 +238,15 @@ WRK_QueueSession(struct sess *sp)
struct worker *w;
pthread_t tp;
struct wq *qp;
static unsigned nq;
unsigned onq;
onq = nq + 1;
if (onq > nwq)
onq = 0;
sp->workreq.sess = sp;
qp = wq[sp->fd % nwq];
qp = wq[onq];
nq = onq;
LOCK(&qp->mtx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment