[Qt-interest] Multithreading - yield function
Arnold Krille
arnold at arnoldarts.de
Tue Sep 1 12:30:27 CEST 2009
On Tuesday 01 September 2009 12:14:26 Patric wrote:
> This is really not cool...
??? wtf? You really miss the main point of multiple thread!
The cool thing about threads is that they run in parallel and do not per se
rely on each other. Only this allows true distribution of the workload.
As soon as you start accessing the same data-structures from multiple threads,
you have to start some locking. But the less locking you need, the better.
That is why some projects rely on lock-free ring-buffers for communication
between two threads.
If your locking is so heavy, that only one of the threads can run at a time,
you can easily drop the threads...
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/20090901/7c3dc8f5/attachment.bin
More information about the Qt-interest-old
mailing list