Use a re-entrant lock for scheduler jobs
Merge branch 'master' into u/ixa1