Modified the input thread to inherit the priority of the main thread