[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Race Condition Issue with KJob and QNetworkAccessManager
From: Adrián_Chaves_Fernández <adriyetichaves () gmail ! com>
Date: 2013-03-07 21:20:48
Message-ID: 3199485.q48URIYp2z () afonso
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
I did help, and a lot! While you didn't explain why the newConnection() signal is \
emitted twice, you gave me a way to avoid counting the same request more than once, \
which is far better. I can now continue working on the tests.
I've posted the issue in the Qt Forums[1], to see if someone there has more input on \
why QTcpServer behaves the way it behaves.
Again, many thanks.
Adrian
O Xoves, 7 de Marzo de 2013 15:31:31 Albert Astals Cid escribiu:
> El Dimarts, 5 de març de 2013, a les 21:25:13, Adrián Chaves Fernández va
> escriure:
> There's no race condition at all between KJob and QNetworkAccessManager, i'd
> say it's just that your code is assuming wrong stuff regarding how the network
> communication happens.
>
> Proof that there is no KJob/QNetworkAccessManager race condition is attached
> in proof1.tar.bz2. As you can see in it, there is no KJob anywhere but you
> still get "Already got this request!!!!!!!!!!!" debugs
>
> Proof that there is something wrong in your assumptions on how the network
> communication happens is attached in proof2.tar.bz2. As you see there I'm not
> sending any data in the post method and all is fine. (You can do the same in
> your code by sending nothing in your post() method inside job.cpp)
>
> Hope this helps.
>
> Cheers,
> Albert
--------
[1] http://qt-project.org/forums/viewthread/25521/
[Attachment #5 (unknown)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Oxygen'; font-size:10pt; font-weight:400; \
font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I did help, \
and a lot! While you didn't explain why the newConnection() signal is emitted twice, \
you gave me a way to avoid counting the same request more than once, which is far \
better. I can now continue working on the tests.</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I've <a \
href="http://qt-project.org/forums/viewthread/25521/"><span style=" text-decoration: \
underline; color:#0057ae;">posted the issue in the Qt Forums</span></a>, to see if \
someone there has more input on why QTcpServer behaves the way it behaves.</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Again, many thanks.</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Adrian</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">O Xoves, 7 de Marzo de 2013 \
15:31:31 Albert Astals Cid escribiu:</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> El Dimarts, 5 de març de 2013, a les \
21:25:13, Adrián Chaves Fernández va </p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> escriure:</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> There's no race condition at all between \
KJob and QNetworkAccessManager, i'd </p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> say it's just that your code is assuming \
wrong stuff regarding how the network </p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> communication happens.</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Proof that there is no \
KJob/QNetworkAccessManager race condition is attached </p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> in proof1.tar.bz2. As you can see in it, \
there is no KJob anywhere but you </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">> still get "Already got this request!!!!!!!!!!!" \
debugs</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Proof that there is \
something wrong in your assumptions on how the network </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> communication happens is \
attached in proof2.tar.bz2. As you see there I'm not </p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">> sending any data in the post method and all \
is fine. (You can do the same in </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">> your code by sending nothing in your post() method inside \
job.cpp)</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p> \
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Hope this helps.</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> </p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Cheers,</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> \
Albert</p></body></html>
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic