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

QThreadPool, activeThreadCounts returns negative number

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.2.0
    • 4.7.1, 4.7.3
    • Core: QtConcurrent
    • None
    • Qt 4.7.1. WinXP. MSVC 2005. QuadCore: Intel i3 CPU 540 @ 3.07 GHZ.
    • dacf9961da86751a59da0e84bc943fe0d1c8d95b

    Description

      With the attached example, QThreadPool::globalInstance()->activeThreadCount() returns a negative number.

      Once this occurs, and all thread(s) are have expired, then the next call to QThreadPool::start will only be queued, not actually run. If a second call to QThreadPool::start is made, then both calls will be run.

      In the file QThreadPool.cpp, I noticed a typo in the name of function registerTheadInactive(). ("Thread" is missing the "r").

      Attachments

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

        Activity

          People

            dfaure_kdab David Faure
            ryan@enzosystems.com Ryan van der Bijl
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes