DRY for thread_preempt