add function to block and to unblock a task

- add minor modifications to support the latest nightly compiler
This tag has no release notes.