Index: src/main/java/org/apache/log4j/AsyncAppender.java
===================================================================
--- src/main/java/org/apache/log4j/AsyncAppender.java	(revision 1044396)
+++ src/main/java/org/apache/log4j/AsyncAppender.java	(working copy)
@@ -90,6 +90,12 @@
   private final Thread dispatcher;
 
   /**
+   * Runnable of the dispatcher
+   * Used for immediate death notification
+   */
+  private Dispatcher dispatcherRunnable;
+
+  /**
    * Should location info be included in dispatched messages.
    */
   private boolean locationInfo = false;
@@ -99,7 +105,7 @@
    */
   private boolean blocking = true;
 
-  /**
+    /**
    * Create new instance.
    */
   public AsyncAppender() {
@@ -109,8 +115,9 @@
     //   only set for compatibility
     aai = appenders;
 
+    dispatcherRunnable = new Dispatcher(this, buffer, discardMap, appenders);
     dispatcher =
-      new Thread(new Dispatcher(this, buffer, discardMap, appenders));
+      new Thread(dispatcherRunnable);
 
     // It is the user's responsibility to close appenders before
     // exiting.
@@ -162,7 +169,7 @@
     event.getThrowableStrRep();
 
     synchronized (buffer) {
-      while (true) {
+      while (dispatcherRunnable.running) {
         int previousSize = buffer.size();
 
         if (previousSize < bufferSize) {
@@ -482,7 +489,13 @@
    * Event dispatcher.
    */
   private static class Dispatcher implements Runnable {
+
     /**
+     * Indicates if this runnable is running
+     */
+    private boolean running = true;
+
+    /**
      * Parent AsyncAppender.
      */
     private final AsyncAppender parent;
@@ -590,6 +603,11 @@
         }
       } catch (InterruptedException ex) {
         Thread.currentThread().interrupt();
+      } finally {
+        synchronized (buffer) {
+          running = false;
+          buffer.notifyAll();
+        }
       }
     }
   }
