Skip to content

Commit

Permalink
fixes 20
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejka committed Oct 17, 2024
1 parent 265a9d5 commit ab8d697
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/data/client2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab8d697

Please sign in to comment.