commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <phil.ste...@gmail.com>
Subject Re: [pool] POOL-97 timer patch
Date Sat, 29 Dec 2007 17:15:41 GMT
Thanks. I will apply this when I am back online. One thing I don't
understand is why the unit tests (which test eviction) do not hang.
Any ideas on that or tests we can add to pick this up?

On 12/29/07, Mark Thomas <markt@apache.org> wrote:
> 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
>
>

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


Mime
View raw message