Skip to content

Commit

Permalink
fix: swallow rejected execution after shutdown
Browse files Browse the repository at this point in the history
closes: #6059

(cherry picked from commit 1ac6b9a)
Signed-off-by: Marc Nuri <marc@marcnuri.com>
  • Loading branch information
shawkins authored and manusa committed Jul 2, 2024
1 parent 91c7f77 commit d264884
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## CHANGELOG

### 6.13.1 (2024-07-02)

#### Bugs
* Fix #6059: Swallow rejected execution from internal usage of the informer executor

### 6.13.0 (2024-05-29)

#### Bugs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void retainAll(Set<String> nextKeys, Consumer<Executor> cacheStateComplet
}
});
if (cacheStateComplete != null) {
cacheStateComplete.accept(this.processor::execute);
cacheStateComplete.accept(this.processor::executeIfPossible);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ public ProcessorListener<T> addProcessorListener(ResourceEventHandler<? super T>
}
}

public void execute(Runnable runnable) {
this.executor.execute(runnable);
public void executeIfPossible(Runnable runnable) {
try {
this.executor.execute(runnable);
} catch (RejectedExecutionException e) {
// already shutdown
}
}
}

0 comments on commit d264884

Please sign in to comment.