klyn.threading.Thread.priority
property
public property priority as String
Description

Requested native scheduling priority: LOWEST, LOW, NORMAL, HIGH or HIGHEST.

Before startup, the setting is applied before user code runs. For a live worker, it is applied immediately. Linux uses nice levels relative to the inherited level; Windows uses SetThreadPriority. Scheduling order is not guaranteed. Raising Linux priority may require OS privileges.

Throws
  • ValueException for an unknown priority.
  • IllegalStateException when the worker has terminated.
  • Exception when the OS refuses or cannot apply the priority.
Example

worker.priority = "LOW"