Added some comments on threading in scheduler code