Scheduler doubt

I have work function let say it has infinite loop
while(1):