From ab8d697c27cdaab19aeed88c23f15e4157d0e368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kami=C5=84ski?= Date: Thu, 17 Oct 2024 16:04:58 +0200 Subject: [PATCH] fixes 20 --- scripts/data/client2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/data/client2.py b/scripts/data/client2.py index 95e74524..6b99e4a5 100644 --- a/scripts/data/client2.py +++ b/scripts/data/client2.py @@ -108,7 +108,7 @@ def job_producer(job_gen): for job, weight in job_gen: # Wait until there is enough weight capacity to add the new block with weight_lock: - while current_weight + weight > MAX_WEIGHT_LIMIT: + while current_weight + weight > MAX_WEIGHT_LIMIT or job_queue.full(): weight_lock.wait() # Wait for the condition to be met # Add the job to the queue and update the weight