HashedWheelTimer.stop() fails
"이희승 (Trustin Lee)"
trustin at gmail.com
Wed Jun 23 22:26:01 EDT 2010
Hi!
That's weird. If you called stop(), an AtomicBoolean flag is set to
true and somehow the timer thread will notice it and kill itself. You
could confirm this behavior at: http://is.gd/d1lG1
Perhaps you could write a standalone application that reproduces the
problem so that I can reproduce the problem?
Thanks,
Trustin
On 06/23/2010 09:45 PM, 002244 wrote:
>
> Greetings!
>
> I have encountered a problem running Netty's Timer facility:
>
> 1. Created one single Timer instance for a whole application on start.
> "Timer timer = new HashedWheelTimer(50, TimeUnit.MILLISECONDS, 64)"
> 2. Created three instances of TimerTask
> 3. Scheduled these tasks multiple times with newTimeout(...) using different
> producers.
> 4. Called stop() on application shutdown
>
> It finished like this:
>
> "Hashed wheel timer #1" prio=3 tid=0x003f9400 nid=0x17 waiting on condition
> [0xfa801000]
> java.lang.Thread.State: TIMED_WAITING (sleeping)
> at java.lang.Thread.sleep(Native Method)
> at
> org.jboss.netty.util.HashedWheelTimer$Worker.waitForNextTick(HashedWheelTimer.java:426)
> at
> org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:357)
> at
> org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
> at java.lang.Thread.run(Thread.java:619)
>
>
> And the Apache Tomcat reported that:
>
> Jun 23, 2010 3:58:53 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: A web application appears to have started a thread named [Hashed
> wheel timer #1] but has failed to stop it.
> This is very likely to create a memory leak.
>
> Is there's something conceptually wrong I miss?
>
>
> Thank You for a wonderful framework Netty^^.
>
--
what we call human nature in actuality is human habit
http://gleamynode.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 293 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100624/0801a3f4/attachment.bin
More information about the netty-users
mailing list