[Qt-interest] wget vs. QHttp download
Thiago Macieira
thiago at kde.org
Wed Nov 10 12:01:18 CET 2010
Em Quarta-feira 10 Novembro 2010, às 11:25:38, Christian Dähn escreveu:
> Sorry, but I already had some very serious problems with event loops for
> network classes inside threads - because not all internal network events
> (which are sent from/to the os' ip stack) support local event loops - some
> os events have to be dispatched by the main event loop.
That's Windows, but it also supports blocking mode. In fact, it works better
in blocking mode -- when you set a socket to non-blocking mode, like we do in
Qt, Windows enters some slow codepaths. (in my opinion, braindead codepaths)
That's why Qt sockets on Windows will always be slow.
> So: If no Troll corrects me, I have to assume that a network app running
> only a local event loop cannot work correctly, if there's no running main
> event loop.
Huh?
There's no "main event loop". There are simply event loops and "app.exec()"
starts one.
If you wanted to make the distinction between an event loop running on the
main thread from one running in an auxiliary thread, then any QEventLoop on
the main thread is a main event loop.
> Best example:
> QTcpServer cannot except / receive incoming connection using a local event
> loop (I and some other developers tried this with Qt 4.5 and 4.6 this year
> and failed to get a QTcpServer running with a local event loop).
It should work just fine.
> Please correct me - but event loops and network stuff in Qt is far away
> from being as easy as you mentioned / thought of.
It should be.
--
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/20101110/c1eca0b4/attachment.bin
More information about the Qt-interest-old
mailing list