Commit d8cc41bc authored by Nils Goroll's avatar Nils Goroll

shrink the critical section under the pool mutex by a bit

Checking and preparing our worker struct does not need to happen
under the lock.
parent a2acba9a
......@@ -326,13 +326,12 @@ Pool_Work_Thread(struct pool *pp, struct worker *wrk)
CHECK_OBJ_NOTNULL(pp, POOL_MAGIC);
wrk->pool = pp;
while (1) {
Lck_Lock(&pp->mtx);
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
WS_Reset(wrk->aws, 0);
AZ(wrk->vsl);
Lck_Lock(&pp->mtx);
if (pp->nidle < pool_reserve())
prio_lim = TASK_QUEUE_RESERVE + 1;
else
......
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