Added SetQueueLength before hook kernels.
rewrite cc_functor. still in debug.