Skip to content

Commit

Permalink
feat(s3stream): optimize eventLoop
Browse files Browse the repository at this point in the history
  • Loading branch information
CLFutureX committed Aug 15, 2024
1 parent c8e5240 commit 8cc63bd
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ public CompletableFuture<Void> submit(Runnable task) {
public void execute(Runnable task) {
check();
tasks.add(task);
if (shutdown.get()) {
if (tasks.remove(task)) {
throw new IllegalStateException("EventLoop is shutdown");
}
}
}

public CompletableFuture<Void> shutdownGracefully() {
Expand Down

0 comments on commit 8cc63bd

Please sign in to comment.