implemented thd_yield()