Function scheduleHighPriorityTask

Schedules a task with high priority to be executed as soon as possible.

It uses Scheduler:postTask if available, otherwise falls back to MessageChannel.