thread_yield first implementation