[Interest] how to block run function of QRunnable class
Thiago Macieira
thiago.macieira at intel.com
Tue Mar 19 15:54:11 CET 2013
On terça-feira, 19 de março de 2013 09.57.57, K. Frank wrote:
> But seriously, does anyone know what the motivation for making sleep
> protected might have been?
It was meant to be used only in the run() method. And as Frank H. replied, it
prevents people from trying to put another thread to sleep by calling it.
Making it difficult for you is actually intentional. It forces you to think
better about your code. Don't sleep. And especially, never sleep in a method
using the global thread pool, like those started by QtConcurrent::run.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130319/c4e496ef/attachment.sig>
More information about the Interest
mailing list