ceki        2002/06/11 06:05:24

  Modified:    src/java/org/apache/log4j Tag: v1_2-branch
                        AsyncAppender.java
  Log:
  The dispatcher thread associated with AsyncAppender is now marked
  as a deamon thread. This resolves bug #9750.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.30.2.1  +5 -3      jakarta-log4j/src/java/org/apache/log4j/AsyncAppender.java
  
  Index: AsyncAppender.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/src/java/org/apache/log4j/AsyncAppender.java,v
  retrieving revision 1.30
  retrieving revision 1.30.2.1
  diff -u -r1.30 -r1.30.2.1
  --- AsyncAppender.java        9 May 2002 17:44:54 -0000       1.30
  +++ AsyncAppender.java        11 Jun 2002 13:05:23 -0000      1.30.2.1
  @@ -37,8 +37,6 @@
      files <a href="xml/examples/doc-files/sample4.xml">sample4.xml</a>
      and <a href="xml/examples/doc-files/sample5.xml">sample5.xml</a>.
   
  -
  -
      @author Ceki G&uuml;lc&uuml;
      @since 0.9.1 */
   public class AsyncAppender extends AppenderSkeleton
  @@ -256,10 +254,14 @@
     Dispatcher(BoundedFIFO bf, AsyncAppender container) {
       this.bf = bf;
       this.container = container;
  -    this.aai = container.aai;
  +    this.aai = container.aai;    
  +    // It is the user's responsibility to close appenders before
  +    // exiting. 
  +    this.setDaemon(true);
       // set the dispatcher priority to lowest possible value
       this.setPriority(Thread.MIN_PRIORITY);
       this.setName("Dispatcher-"+getName());
  +
       // set the dispatcher priority to MIN_PRIORITY plus or minus 2
       // depending on the direction of MIN to MAX_PRIORITY.
       //+ (Thread.MAX_PRIORITY > Thread.MIN_PRIORITY ? 1 : -1)*2);
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to