[scheduler] fix deadlock introduced in D15373840
[scheduler] fix deadlock introduced in D15373840

Reviewed By: mbouaziz

Differential Revision: D15494101

fbshipit-source-id: 380cdfa7e

jvillard/infer,facebook/infer,jvillard/infer,facebook/infer,facebook/infer,facebook/infer,facebook/infer,facebook/infer,facebook/infer,jvillard/infer,jvillard/infer,jvillard/infer,jvillard/infer,jvillard/infer