From eb593f9402c598d6cc75d08fbfe07f01482244c2 Mon Sep 17 00:00:00 2001 From: Santeri Korri Date: Mon, 16 Dec 2024 13:11:26 +0200 Subject: [PATCH] limiter fixup --- .../kooste/valintalaskenta/actor/ConcurrencyLimiter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/fi/vm/sade/valinta/kooste/valintalaskenta/actor/ConcurrencyLimiter.java b/src/main/java/fi/vm/sade/valinta/kooste/valintalaskenta/actor/ConcurrencyLimiter.java index c66b585e5..cb5a0cade 100644 --- a/src/main/java/fi/vm/sade/valinta/kooste/valintalaskenta/actor/ConcurrencyLimiter.java +++ b/src/main/java/fi/vm/sade/valinta/kooste/valintalaskenta/actor/ConcurrencyLimiter.java @@ -63,8 +63,8 @@ public void setMaxPermits(int newPermits) { LOG.info("Lisätään vaiheen " + this.nimi + " limitteriin " + dPermits + " permittiä."); this.semaphore.release(dPermits); } else { - LOG.info("Vähennetään vaiheen " + this.nimi + " limitteristä " + dPermits + " permittiä."); - this.executor.submit(() -> this.semaphore.acquireUninterruptibly(dPermits)); + LOG.info("Vähennetään vaiheen " + this.nimi + " limitteristä " + -dPermits + " permittiä."); + this.executor.submit(() -> this.semaphore.acquireUninterruptibly(-dPermits)); } }