Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Windows ce 6.0 r2 - QThread::wait problem.

    Mobile and Embedded
    1
    2
    2117
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mkornal last edited by

      I work with Windows CE 6.0 r2 and Qt 4.7.4.
      In a slot function is line:
      @QThread::currentThread()->wait(5000);@

      and it doesn't work, just writes warning: "QThread::wait: Thread tried to wait on itself".
      I am not sure if it is important, but the slot is connected to QTcpSocket::readyRead() signal.

      Has anyone had similar problem?

      One more thing with "milliseconds" i background.
      I have message handler function used with qInstallMsgHandler(QtMsgHandler handler) with code:
      @QTime::currentTime().toString("hh:mm:ss:zzz")@

      and the milliseconds are always "000".

      1 Reply Last reply Reply Quote 0
      • M
        mkornal last edited by

        OK. I've just recognized that this is the way it works due to QThread::wait() source:
        @if (d->id == GetCurrentThreadId()) {

            qWarning("QThread::wait: Thread tried to wait on itself");
        
            return false;
        
        }@
        

        Can anybody give me a hint with the second issue?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post