Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-46047

QWaitCondition::wait() does not wait for timeout period

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1: Critical P1: Critical
    • None
    • 5.3.1
    • QPA
    • None
    • Android

      This code works on Nexus 4 with Android versions: 4.2.x, 4.3.x and 4.4.x. However the code fails when run on Android 5.1 and 5.0.x.

      QMutex sleepMutex;
      QWaitCondition wc;

      sleepMutex.lock();

      qDebug() << QString("%1 Before wait...").arg(QTime::currentTime().toString());
      bool rval = wc.wait(&sleepMutex, 5000UL);
      qDebug() << QString("%1 After wait rval=%2").arg(QTime::currentTime().toString()).arg(rval);

      On Android 5.x the call to wait() returns immediately with a return value of false.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            esabraha Eskil Abrahamsen Blomfeldt
            xped Chris Wood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes