Thread priority is typically decided by the developer when coding the application, who can set a desired priority level. However, the (operating system’s scheduler) ultimately enforces and manages these priorities, sometimes adjusting them dynamically based on system load.