avoid race in GetTask()
Merge branch 'condition_scheduler' of https://github.com/heni/rem into condition_scheduler