it prevent the preemption problems threads cause