summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2021-08-24 23:10:45 -0700
committerVito Caputo <vcaputo@pengaru.com>2021-08-24 23:10:45 -0700
commit4fbaee45f4bc2fc06d5e7e5fc2d284d6535004d9 (patch)
tree577a58d3ebc3f4fdc9ffb8352c988154d2898549
parentfbee13e2f633f0db7c6c9ceeaf4c5d4867baa4f8 (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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/iou.c b/src/iou.c
index 1ce9af1..b28d8f6 100644
--- a/src/iou.c
+++ b/src/iou.c
@@ -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;
© All Rights Reserved