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

Reset QThread requested interruption

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.3.1, 5.3.2
    • Fix Version/s: 5.2.0
    • Component/s: Core: Threads
    • Labels:
      None
    • Environment:

      All

      Description

      A method requestInterruption() have been added to QThread in Qt 5.2.

      It is very usefull. However, there is no way to reset the interruptionRequested attribute. So if you stop a job running once, you can't then start new jobs later since those job will check the interruptionRequested attribute and see that it is already true.

      I can find 2 solutions to that (that keep compatibility):

      • The method requestInterruption() can take a boolean parameter (which is true by default)
      • Create a new method resetRequestedInterruption()

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            vinorcola Kévin PERAIS
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes