Qt Forum

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

    Qt Academy Launch in California!

    Solved How can I find out quantity of unfulfilled tasks in QThreadPool?

    General and Desktop
    3
    5
    758
    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.
    • A
      AlekseyB last edited by

      I want know all of my remaining tasks.
      How can I do it?

      jsulm 1 Reply Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @AlekseyB last edited by

        @AlekseyB How do you manage your tasks?
        Keep track of not started or running tasks (for example keep them in a list).
        If a thread finishes its task it can emit a signal so you can remove the finished task from the list.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 1
        • A
          AlekseyB last edited by AlekseyB

          @jsulm said in How can I find out quantity of unfulfilled tasks in QThreadPool?:

          Keep track of not started or running tasks (for example keep them in a list).
          If a thread finishes its task it can emit a signal so you can remove the finished task from the list.

          Now I use a similar solution. But I don't like it.

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Hi,

            QThreadPool doesn't provide that API so you're doing the right thing.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            A 1 Reply Last reply Reply Quote 1
            • A
              AlekseyB @SGaist last edited by

              @SGaist Thenks!

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