This is not what I suggested. I suggested checking the stop flag after going through the acquire call. The thing you do in your code snippet you pasted here does nothing. Many things can happen between release() and wait().
This is not what I suggested. I suggested checking the stop flag after going through the acquire call. The thing you do in your code snippet you pasted here does nothing. Many things can happen between release() and wait().
Thanks a lot Wysota. i solved the problem by taking the approach "Your application hangs because the threads are sleeping on their semaphores. You should first make sure the "flag_stop" will really stop them without making one of the threads sleep on its semaphore because of an empty/full buffer - if the "flag_stop" is set when the thread is already sleeping, it might never be woken up." - quoted by you. Thanks a lot![]()
I worked on windows Xp with Qt 4.2.2(Open Source Version) and MinGw
now i am trying the same things on Fedora Core 5 (linux-gcc) and Qt 4.2.2 open source edition.
Bookmarks