1. A method, comprising: at a hardware-multithreaded processor, determining that a first task is blocked from execution by a second task, the first task having a first priority and the second task having a second priority that is lower than the first priority; setting a temporary priority of the second task to be equal to an elevated priority that is higher than the second priority, such that when the second task has the temporary priority and is preempted from execution at the hardware-multithreaded processor by another task, the second task is rescheduled for execution based on the temporary priority and when the second task has the temporary priority and is not preempted from execution at the hardware-multithreaded processor, the second task will be executed based on the second priority; and clearing the temporary priority of the second task in response to the second task releasing a synchronization object blocking the first task from execution.