Class Threads

java.lang.Object
org.wpilib.system.Threads

public final class Threads extends Object
Thread utility functions.
  • Method Details

    • getCurrentThreadPriority

      public static int getCurrentThreadPriority()
      Gets the current thread's priority.

      Priorities range from 0 to 99 where 0 is non-real-time, and 1-99 are real-time, and 99 is highest priority. See "man 7 sched" for details.

      Returns:
      The current thread's priority.
    • setCurrentThreadPriority

      @Deprecated public static boolean setCurrentThreadPriority(int priority)
      Deprecated.
      Incorrect usage of real-time priority can lead to system lockups. Only use this function if you are trained in real-time software development.
      Sets the current thread's priority.

      Priorities range from 0 to 99 where 0 is non-real-time, 1-99 are real-time, and 99 is highest priority. See "man 7 sched" for details.

      Parameters:
      priority - The priority.
      Returns:
      True on success.