Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tginsberg committed Aug 21, 2024
1 parent dbb401a commit d8c07f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ private void resetPeriod() {
remainingPermits = allowedPerPeriod;
}

// TODO: Is it safe to assume this is single threaded?
// Assuming this is not run in parallel. Gate with a lock if that assumption fails/changes.
boolean attempt() {
final long now = clock.millis();
if(now < thisPeriodEnd) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void clockMustNotBeNull() {

@Test
void defaultsRuleToPause() {
// Arrante/Act
// Arrange/Act
final ThrottlingGatherer<String> gatherer = new ThrottlingGatherer<>(null, 1, Duration.ofSeconds(1));

// Assert
Expand Down

0 comments on commit d8c07f8

Please sign in to comment.