Skip to content

Commit

Permalink
fix: swallow rejected execution after shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
shawkins committed Jun 19, 2024
1 parent 7074fbc commit 8c57460
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#### Bugs
* Fix #6038: Support for Gradle configuration cache
* Fix #6059: Swallow rejected execution from internal usage of the informer executor

#### Improvements
* Fix #6008: removing the optional dependency on bouncy castle
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 8c57460

Please sign in to comment.