I want to write a code to switch between threads every 10 microseconds automatically. but the problem is in the yield function I get an interrupt so it doesn\'t finish prope