[Qt-interest] Problems with threads and explicitely shared data
Arnold Krille
arnold at arnoldarts.de
Fri Oct 2 09:35:49 CEST 2009
On Friday 02 October 2009 01:09:11 Stephen Jackson wrote:
> I built your project and it crashes for me. I ran it under valgrind
> and the first problem this threw up was this. In
> ChainMemberThread::run() you have
> NSCore::AcqisitionDataSet data = _queue.first();
> This breaks when _queue is empty. When protected by
> if (!_queue.isEmpty())
> it no longer crashes and valgrind reports no problems.
You are right!
I thought using a semaphore in the outer class when adding and removing from
the queue was enough, but apparently not.
Thanks,
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091002/bd546734/attachment.bin
More information about the Qt-interest-old
mailing list