Details
-
Task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
(talk to Markus about this)
We seem to have this code already:
void QHttpNetworkConnectionChannel::allDone() [...] bool emitFinished = reply->d_func()->shouldEmitSignals(); [...] // queue the finished signal, this is required since we might send new requests from // slot connected to it. The socket will not fire readyRead signal, if we are already // in the slot connected to readyRead if (emitFinished) QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection); [...]
which is bad worse for performance since it means that we will always go via the event loop when a HTTP request is finished.
What we should do is emit finished() directly and while emitting set something like QNetworkAccessManagerPrivate.isEmitting=true.
Then when a new get() is requested in the QNAM we would check the isEmitting first and will only go the "direct sending" way if it is false.
Attachments
Issue Links
- depends on
-
QTBUG-14162 Threading support for QNetworkAccessManager
- Closed