[Development] About "finish" signal in QHttpNetworkConnectionChannel
Markus Goetz
markus at woboq.com
Thu Jul 19 21:31:30 CEST 2012
On 19.07.12 17:55, song.7.liu at nokia.com wrote:
>
> Hi,
>
> I am using the QNetworkAccessManager::get to request content from
> http://www.google.com.
>
> Then the QHttpNetworkConnectionChannel will be created and worked on
> another thread, when all the data is received, the
> QHttpNetworkConnectionChannel::allDone will be invoked, where:
>
> // 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 (reply && emitFinished)
>
> QMetaObject::invokeMethod(reply, "finished",
> Qt::QueuedConnection);
>
> So this "finished" signal will be queued in the thread of
> QNetworkReplyHttpImpl until a new event will be handled.
>
> Finally, my application also won't receive any finished signal until
> for example: touch the screen to trigger the queued signal be handled.
>
> So why using the type Qt::QueuedConnection for this "finished" signal
> ? is there something wrong in my side ?
>
>
The finished() communicated will be "queued" anyway nowadays since the
inter-thread communication (from HTTP thread to your user thread) is
happening via the event loop. Also it is not queued until a new event
will be handled, it should flow to your user thread without further delay.
I have no idea right now why your issue could happen =>
https://bugreports.qt-project.org
bye,
Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120719/89150171/attachment.html>
More information about the Development
mailing list