title: The thread order issue in handler object
body: <p>I have a handler object as below, just an example
  My question is: if someone calls dataSync.setDataEnabled(true) then call dataSync.getDateEnabled() immediately. Can we make sure set/get still execute in order in dataSync class? Because we use message to write data but read data directly.</p>
  
  <p>Thanks</p>
  
  <pre><code>class dataSync extends Handler {
      ...
  
      @Override
      public void handleMessage(Message msg) {
          case CMD_SET_DATA_ENABLE_SYN:
          final boolean enabled = ((boolean)msg.arg1) ? true : false;
          setDataEnabledSync(enabled);
          break;  
      }
  
      public boolean getDateEnabled() {
          sync (mLock) {
              return mDataEnabled;
          }
      }
  
      void setDataEnabled(boolean enable) {
          Message msg = obtainMessage(CMD_SET_DATA_ENABLE_SYNC);
          msg.arg1 = enable ? 1 : 0;
          sendMessage(msg);
      }
  
      void setDataEnabledSync(enabled); {
          sync (mLock) {
              mDataEnabled = enabled;
          }
      }
  }
  </code></pre>