Skip to content

Commit

Permalink
limiter fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jkorri committed Dec 16, 2024
1 parent 8551ebf commit 8a5f094
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down

0 comments on commit 8a5f094

Please sign in to comment.