Qt Forum

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

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

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

    General and Desktop
    1
    1
    418
    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.
    • K
      koliva last edited by

      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 Reply Quote 0
      • First post
        Last post