added thread_preempt