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

Qt::QueuedConnection deliver the signal in the error order when the load is high

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 4.8.0
    • Core: Threads
    • None
    • qt:4.74 (MinGW,opensource)
      os:window xp sp3
      processor: Celeron(R) Dual-Core CPU

    Description

      I connected a signal to a slot by Qt::QueuedConnection type. The signal object is in work thread,and the slot object is in the GUI thread. I put a number as the parameter. When I emit the signal at very high speed with the parameter.like below: emit sgnlOrderNotify(order+); Then I found that ,the slot function received the paramter in error order.did not incremented order by order. For exmaple, I emit the serial 1-2-3-4-5-6.... but the received maybe is 1-4-5-2-3...。 when I changed the connection type to Qt::BlockingQueuedConnection. I found the this error disappeared. I then used the QEvent do deliver the parameter,like below "qApp->postEvent(recv_obj,new TMyEvent(order+))", the same error ocurred. So I think that Qt::QueuedConnection may have a bug. Of course, this error only ocurred at high load, when emit the signal at low speed,this error does not ocurred.

      Attachments

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

        Activity

          People

            earthdomain Earth Domain (Inactive)
            ruruo yin.wenyong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes