Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can I find out quantity of unfulfilled tasks in QThreadPool?
QtWS25 Last Chance

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

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 989 Views
  • 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 Offline
    A Offline
    AlekseyB
    wrote on last edited by
    #1

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

    jsulmJ 1 Reply Last reply
    0
    • A AlekseyB

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

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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
      1
      • A Offline
        A Offline
        AlekseyB
        wrote on last edited by AlekseyB
        #3

        @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
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          1
          • SGaistS SGaist

            Hi,

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

            A Offline
            A Offline
            AlekseyB
            wrote on last edited by
            #5

            @SGaist Thenks!

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved