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

Implements #1233. Few sync improvement in scheduler tasks.