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. QThreadPool... How to do
Qt 6.11 is out! See what's new in the release blog

QThreadPool... How to do

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 936 Views 1 Watching
  • 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.
  • T Offline
    T Offline
    Tom C
    wrote on last edited by
    #1

    Hi, everyone !

    In my application, I use the global QThreadPool to run many tasks asynchronously and make use of the priority system. However, some of these tasks have to be executed sequentially and I don't know how to mix both (asynchronous and synchronous) on the global QThreadPool.

    Is there a way to do so ?

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      QThreadPool wasn't designed to check task sequences, so you'll have to manage the sequence externally (e.g. emit a signal when each task finishes, to trigger the start of the next task).

      You can have a look at how KDE's "ThreadWeaver":http://api.kde.org/4.0-api/kdelibs-apidocs/threadweaver/html/index.html (which is built on Qt) does it.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      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