src/share/classes/com/sun/jndi/ldap/pool/PoolCleaner.java

Print this page

        

@@ -28,11 +28,11 @@
 /**
  * Thread that wakes up periodically and closes expired, unused connections.
  *
  * @author Rosanna Lee
  */
-final public class PoolCleaner extends Thread {
+final public class PoolCleaner implements Runnable {
     final private Pool[] pools;
     final private long period;
 
     /**
      * @param period ms to wait between cleaning

@@ -40,13 +40,13 @@
      */
     public PoolCleaner(long period, Pool[] pools) {
         super();
         this.period = period;
         this.pools = pools.clone();
-        setDaemon(true);
     }
 
+    @Override
     public void run() {
         long threshold;
         while (true) {
             synchronized (this) {
                 // Wait for duration of period ms