-
Feature Request
-
Resolution: Done
-
Major
-
None
-
None
TimeScheduler currently extends ScheduledThreadPoolExecutor, which uses a DelayQueue for keeping an ordered list of tasks (ordered by their execution times).
DelayQueue doesn't provide good speed, e.g. (IIRC) remove() requires a linear list scan.
ConcurrentSkipListMap however provides O(log) cost for get(), put(), remove() and containsKey(). Attached is a cursory impl of TimeScheduler based on ConcurrentSkipListMap. It is faster than the old version.
Since ConcurrentSkipListMap requires JDK 1.6, we cannot use this in 2.6.x. It can be used in 3.0 only, or perhaps - after a discussion on the mailing list - in 2.9...
1.
|
TimeScheduler: remove RobustRunnable | Resolved | Bela Ban |