You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GitBox <gi...@apache.org> on 2020/04/21 17:40:48 UTC

[GitHub] [tomcat] KangZhiDong opened a new pull request #279: Optimize concurrency

KangZhiDong opened a new pull request #279:
URL: https://github.com/apache/tomcat/pull/279


   more performance


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] KangZhiDong commented on issue #279: Optimize concurrency

Posted by GitBox <gi...@apache.org>.
KangZhiDong commented on issue #279:
URL: https://github.com/apache/tomcat/pull/279#issuecomment-617485732


   > What is the basis for this change?
   > While the thread is in `wait()`, `notify()` should only be called if one of the conditions in the surrounding `if(...)` is no longer true. I'd expect the change in this PR to make performance marginally worse, not better.
   
   i think because "while (sendfileRunning && sendfileCount < 1 && addS.size() < 1)"  in outer layer check again,so it  can use "if" there ,do not need check again in synchronized block


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] KangZhiDong commented on issue #279: Optimize concurrency

Posted by GitBox <gi...@apache.org>.
KangZhiDong commented on issue #279:
URL: https://github.com/apache/tomcat/pull/279#issuecomment-617483507


   > What is the basis for this change?
   > While the thread is in `wait()`, `notify()` should only be called if one of the conditions in the surrounding `if(...)` is no longer true. I'd expect the change in this PR to make performance marginally worse, not better.
   
   When this thread is notify , it do not check "(sendfileRunning && sendfileCount < 1 && addS.size() < 1)" ,but "while" check again,avoid other thread  may change it


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] markt-asf commented on issue #279: Optimize concurrency

Posted by GitBox <gi...@apache.org>.
markt-asf commented on issue #279:
URL: https://github.com/apache/tomcat/pull/279#issuecomment-617654855


   Your analysis is not correct.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[GitHub] [tomcat] markt-asf commented on issue #279: Optimize concurrency

Posted by GitBox <gi...@apache.org>.
markt-asf commented on issue #279:
URL: https://github.com/apache/tomcat/pull/279#issuecomment-617338009


   What is the basis for this change?
   While the thread is in `wait()`, `notify()` should only be called if one of the conditions in the surrounding `if(...)` is no longer true. I'd expect the change in this PR to make performance marginally worse, not better.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org