[Interest] how to run 21 threads concurrently
Jan Kundrát
jkt at flaska.net
Fri Oct 5 13:12:13 CEST 2012
On 10/05/12 00:27, Sascha Cunz wrote:
> But, after all, the above code is a so called busy-loop. It will eat up 1 core
> almost completely (At least on most OS-configurations).
Are you sure that a call to QFuture::waitForFinished() consumes CPU?
That would be highly suspicious. Yes, the call will block and wait until
the QFuture succeeds, but that's different from what a busy loop is.
Using waitForFinished() on each future is easier and more
straightforward than adding semaphores.
With kind regards,
Jan
--
Trojita, a fast e-mail client -- http://trojita.flaska.net/
More information about the Interest
mailing list