ifesdjeen / hashed-wheel-timer

High Performance Timer / Scheduler Library compatible with ScheduledExecutorService
Eclipse Public License 1.0
223 stars 43 forks source link

add pluggable CallableFactory #4

Open 0xg0nz0 opened 7 years ago

0xg0nz0 commented 7 years ago

constantlyNull() should continue to be the default, but it should be possible to plug in a Function<Callable, Runnable> if the developer wants to provide a custom wrapper. This is in part for performance reasons: if you schedule many Runnable tasks you will generate many short-lived Callable objects.