for(unsigned int i=0;i<execution->get_num_threads();i++,tid=(tid+1)%execution->get_num_threads()) {
//don't try to schedule finished threads
if (execution->get_thread(int_to_id(tid))->is_complete())
for(unsigned int i=0;i<execution->get_num_threads();i++,tid=(tid+1)%execution->get_num_threads()) {
//don't try to schedule finished threads
if (execution->get_thread(int_to_id(tid))->is_complete())