[concurrency-interest] Frequently canceled timers

Richard Johns rjohns at nortel.com
Thu Jan 24 11:20:46 EST 2008

I have an application that retransmits messages when they don't get a 
timely response .  Usually, of course, that's not necessary and their 
timers are canceled.  This is a traffic generator so message rate is 
high and we need to remove the canceled timers.

Is there a timer implementation that efficiently cleans up canceled 
timers?  DelayQueue uses a binary heap so it's very fast otherwise, but 
it uses a sequential search for remove().  ScheduledThreadPoolExecutor 
uses DelayQueue, and Timer also uses a binary heap.


More information about the Concurrency-interest mailing list