Implements #1233. Few sync improvement in scheduler tasks.
Merge pull request #1236 from emmanuel-keller/master

Implements #1233. Few sync improvement in scheduler tasks.