Use number_of_tasks in Scheduler.cpp