From 7674f45914115e6d4c86b2b6ea2ba53fe3a6d932 Mon Sep 17 00:00:00 2001 From: "David M. Lloyd" Date: Wed, 20 Sep 2023 11:33:44 -0500 Subject: [PATCH] Fix potential hang when waiting for a cancelled future --- src/main/java/org/jboss/threads/EnhancedQueueExecutor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/jboss/threads/EnhancedQueueExecutor.java b/src/main/java/org/jboss/threads/EnhancedQueueExecutor.java index 5fa3450..798f75e 100644 --- a/src/main/java/org/jboss/threads/EnhancedQueueExecutor.java +++ b/src/main/java/org/jboss/threads/EnhancedQueueExecutor.java @@ -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: {