diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2021-08-24 23:10:45 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2021-08-24 23:10:45 -0700 |
commit | 4fbaee45f4bc2fc06d5e7e5fc2d284d6535004d9 (patch) | |
tree | 577a58d3ebc3f4fdc9ffb8352c988154d2898549 | |
parent | fbee13e2f633f0db7c6c9ceeaf4c5d4867baa4f8 (diff) |
iou: don't loop until n_async depletes
This wasn't right, if there's actually a backlog of async jobs this
could hold up progress for non-async completions for no good reason.
Just do completions for whatever is present in the processed list,
don't potentially wait.
-rw-r--r-- | src/iou.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -349,7 +349,7 @@ int iou_run(iou_t *iou) return r; /* complete any processed async work */ - while (iou->n_async) { + if (iou->n_async) { pthread_mutex_lock(&iou->processed_mutex); _op = iou->processed; |