[Qt-interest] QRunnable question

Thiago Macieira thiago at kde.org
Tue May 4 16:32:38 CEST 2010


Em Terça-feira 04 Maio 2010, às 15:33:42, Philippe escreveu:
> derived from QThread (QProcess, QAudioInputPrivate, QLocalSocket,
> QSQLite2ResultPrivate...)

QProcess and QLocalSocket are the same issue: pipes on Windows. And the nature 
of QWindowsPipeWriter is that it is a thread. So your argument breaks down 
here.

The implementation of both on Unix is clear of sleeps.

QAudioInputPrivate is the case which I referred to: hardware polling. But it 
shouldn't be in the main thread. Then again, no one said ALSA had a good 
API...

What's more, there are uses of sleep out there in the code that exist because 
the developer didn't know better. It doesn't mean it's proper solution. I'm 
pretty sure that non-blocking pipe writing on Windows can be improved to not 
use sleeps.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100504/ca8bcafd/attachment.bin 


More information about the Qt-interest-old mailing list