Clear task queue when shutting down scheduler
Move task queue clearing after scheduler is shutdown
Merge branch 'master' into scheduler
Update comments
Merge pull request #2881 from ke-yu/scheduler

Clear task queue when Scheduler is shutdown