It would seem to me like the canSchedule variable could be replaced with !threadPool.isShutdown(), or am I missing something ?