code: synchronized TransactionQueueEvent nextTransactionEvent()
          throws InterruptedException {
  
          if (mQueue.isEmpty()) {
              if (mIdleTimeout != 0) {
                  if (mIdleTimeout < 0) {
                      wait();
                  }
                  else {
                      wait(mIdleTimeout);
                  }
              }
          }
  
          if (mQueue.isEmpty()) {
              return null;
          }
  
          return (TransactionQueueEvent)mQueue.removeFirst();
      }
docs: Returns null when the TransactionQueue should go idle.