shadows/framework/src/main/java/org/robolectric/shadows/ShadowProcess.java
@Implementation
  protected static final void setThreadPriority(int tid, int priority) {
    checkArgument(
        priority >= android.os.Process.THREAD_PRIORITY_URGENT_AUDIO
            && priority <= android.os.Process.THREAD_PRIORITY_LOWEST,
        "priority %s out of range. Use a Process.THREAD_PRIORITY_* constant.",
        priority);

    if (tid == 0) {
      tid = ShadowProcess.myTid();
    }
    synchronized (threadPrioritiesLock) {
      threadPriorities.put(tid, priority);
    }
  }
@Implementation
  protected static final void setThreadPriority(int tid, int priority) {
    checkArgument(
        priority >= android.os.Process.THREAD_PRIORITY_URGENT_AUDIO
            && priority <= android.os.Process.THREAD_PRIORITY_LOWEST,
        "priority %s out of range. Use a Process.THREAD_PRIORITY_* constant.",
        priority);

    if (tid == 0) {
      tid = ShadowProcess.myTid();
    }
    synchronized (threadPrioritiesLock) {
      threadPriorities.put(tid, priority);
    }
  }
@ Implementation protected static final void setThreadPriority ( int tid , int priority ) { checkArgument ( priority >= android . os . Process . THREAD_PRIORITY_URGENT_AUDIO && priority <= android . os . Process . THREAD_PRIORITY_LOWEST , "priority %s out of range. Use a Process.THREAD_PRIORITY_* constant." , priority ) ; if ( tid == 0 ) { tid = ShadowProcess . myTid ( ) ; } synchronized ( threadPrioritiesLock ) { threadPriorities . put ( tid , priority ) ; } }
Stores priority for the given thread, but doesn't actually change it to not mess up with test
runner. Unlike real implementation does not throw any exceptions.

@param tid The identifier of the thread. If equals zero, the identifier of the calling thread
will be used.
Stores priority for the given thread but doesn t actually change it to not mess up with test runner . Unlike real implementation does not throw any exceptions .