If there are threads running when QueuelessExecutor.shutdown() is called, it does not call shutdownListenable.shutdown() and relies on the handling in Worker.run() to invoke that once the last thread has shut down. https://github.com/jbossas/jboss-threads/blob/master/src/main/java/org/jboss/threads/QueuelessExecutor.java#L673 will set the flag to invoke it if the conditions are met. That logic is defeated by https://github.com/jbossas/jboss-threads/blob/master/src/main/java/org/jboss/threads/QueuelessExecutor.java#L632, which will remove the thread first causing the remove call in the finally block to always return false and so not set the last flag.
https://github.com/jbossas/jboss-threads/pull/11 is for the 2.1 branch, which is what we'd want to pull in to fix in the product.
David Lloyd <david.lloyd> updated the status of jira JBTHR-28 to Resolved
Fix will be in the jboss-threads 2.1.2 release.
Verified with EAP 6.4.0.DR9. Very easy to reproduce using the reproducer from JBTHR-29 (which is in fact a duplicate of JBTHR-28).