Added wait for consumed tasks and idle trimming features
Merge pull request #7 from Kris-LIBIS/master

Features: wait for consumed tasks and idle trimming