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

Sergey S sergey.saleev at gmail.com
Wed Jan 13 03:37:49 EST 2010


Hi Trustin,

it's great!

Thanks.


Trustin Lee wrote:
> 
> 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/
> 
> 
> 
>  
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Is-there-way-to-execute-Timer-timeouts-immediately-in-the-timer-thread-tp4291089p4331025.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list