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

Race condition in QThread

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.4
    • 4.3.1
    • Core: Threads
    • None
    • 9aa4538b219ed759a47e8d1f93c2797bf07b5e2f 5c42726aac64dd270dc5f7dd87ad925db2ee46cf 13ca61fcfdc53a6a06ae6f409ae0d9e17919336c 2e72a8b19ea6c674fb4777860dac50faa5d387e6

    Description

      There appears to be a race condition in QThread, similar to the bug in task 163880. Given a QThread subclass with a destructor like

      ~Worker()

      { quit(); if (isRunning()) wait(); }

      then quit() can be called before the event loop is ever entered, and wait() will never return, leading to a deadlock.

      Attachments

        Issue Links

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

          Activity

            People

              bhughes Bradley T. Hughes (closed Nokia Identity) (Inactive)
              admin Administrator
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes