Add thread priority support.