commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: [pool] POOL-97 timer patch
Date Sat, 29 Dec 2007 12:02:52 GMT
Mark Thomas wrote:
> Phil Steitz wrote:
>> Yes, I saw this with both the pool and dbcp tests when I set the
>> timeBetweenEvictionRuns to a positive number
> 
> Sorry. My bad. I was being stupid. I see this now with 1.5.0_13 and
> 1.6.0_03. I'll see if I can figure out why.

Found it. My new EvictionTimer class wasn't configuring the timer thread as
a daemon thread unlike the code it replaced. The following patch fixes it.

Mark

Index: EvictionTimer.java
===================================================================
--- EvictionTimer.java	(revision 607305)
+++ EvictionTimer.java	(working copy)
@@ -53,7 +53,7 @@
      */
     static synchronized void schedule(TimerTask task, long delay, long
period) {
         if (null == _timer) {
-            _timer = new Timer();
+            _timer = new Timer(true);
         }
         _usageCount++;
         _timer.schedule(task, delay, period);


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message