Is there way to execute Timer timeouts immediately in the timer thread?

"Trustin Lee (이희승)" trustin at gmail.com
Tue Jan 12 21:05:11 EST 2010


Hi Sergey,

HashedWheelTimer executes a TimerTask in its timer thread already.

HashedWheelTimer does not spawn a new thread for each timeout but
creates one thread only in the beginning.  You should not create a new
HashedWheelTimer for each new timeout.

HTH,
Trustin

Sergey S wrote:
> Hi
> 
> It looks like HashedWheelTimer doesn't support this. May be somebody knows
> workarounds or other timer implementation supporting this?
> 
> I need to synchronize processing of asynchronous timer and network events.
> In my current implementation timeout just places Runnable to single thread
> executor's queue. Spawing new thread on each timeout looks like useless
> overhead imo.
> 
> Thanks.

-- 
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: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100113/fd170ee1/attachment.bin 


More information about the netty-users mailing list