On 31 July 2016 at 09:44, Konstantin Shegunov <kshegu...@gmail.com> wrote:
> Hello,
>
> On Sat, Jul 30, 2016 at 10:17 PM, Nilesh Kokane <nilesh.kokan...@gmail.com>
> wrote:
>>
>> The push function is called for 1000 times though. Any clue?
>
>
> When the pushing of data finishes all threads that are waiting for new data
> will be hanging on consumer.acquire(). Since you provide no way for them to
> continue, or to know that there's nothing more to pop() ... well they just
> sit patiently and wait for the semaphore.

And for the solution, this might help:
http://doc.qt.io/qt-5/qtcore-threads-waitconditions-example.html

Chris

>
> Kind regards.
>
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to