title: What is the impact of setting different priority on handler thread?
body: <p>I'm have a handler thread with thread priority set to background,</p>
  
  <blockquote>
    <p>myHandlerThread = new HandlerThread(HANDLER_THREAD_NAME,
    Process.THREAD_PRIORITY_BACKGROUND);</p>
  </blockquote>
  
  <p>On this <code>myHandlerThread</code> I'm doing some operation to alter system property by invoking </p>
  
  <pre><code>SystemProperties.set(property, propertyValue);
  </code></pre>
  
  <p>I'm facing this exception frequently,</p>
  
  <pre><code>[Events]
  java.lang.RuntimeException: failed to set system property
  at android.os.SystemProperties.native_set(Native Method)
  at android.os.SystemProperties.set(SystemProperties.java:130)
  </code></pre>
  
  <p>There can be multiple reasons which can cause this </p>
  
  <p>1) The native code might have timed out when executing this code.</p>
  
  <p>2) Since the thread is given with priority <code>BACKGROUND</code> it might not have time to execute when the CPU is busy and might have timed out at the end.</p>
  
  <p>Will increasing the thread priority to <code>NORMAL</code> would help? Or how the thread will get timed out? Or what are the other reasons which could cause this issue?</p>