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 a070c4f commit eb593f9
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 eb593f9

Please sign in to comment.