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. Producer-consumer problem. Which one is the most performant?
Qt 6.11 is out! See what's new in the release blog

Producer-consumer problem. Which one is the most performant?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 711 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.
  • K Offline
    K Offline
    koliva
    wrote on last edited by
    #1

    Hi,
    I have a pipeline where the image generator generates image frames (producer) and the other process processes those generated image frames (consumer). These two processes are completely separate from each other. The speed of each process varies depending on the incoming or being generated image. I am planning to follow the example given in this link.
    However, I am thinking of implementing it using QQueue with a fixed number of image buffers. There is also other way to implement it using regular QVector or QCircularBuffer. I was wondering which one of those would be the most performant? The only think that I would like to achieve is that, there will be limited number of buffers (let say 5), and producer will produce until the buffer is full, then wait, if it sees that the buffer is available, it will continue generating. The consumer will consume the buffers one by one if there is any available.

    I'd appreciate if you could give me some sources to follow if there is any.
    Regards,

    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