Skip to content

Commit

Permalink
Fix potential hang when waiting for a cancelled future
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlloyd committed Sep 20, 2023
1 parent 1bbfdec commit 7674f45
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/org/jboss/threads/EnhancedQueueExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2626,6 +2626,7 @@ public boolean cancel(final boolean mayInterruptIfRunning) {
case ASF_ST_WAITING:
case ASF_ST_SUBMITTED: {
this.state = ASF_ST_CANCELLED;
notifyAll();
return true;
}
case ASF_ST_RUNNING: {
Expand Down

0 comments on commit 7674f45

Please sign in to comment.