Hi!

Reviewing Remy's r1575545 reminded me that I had a question on the
code of AbstractServletOutputStream.onWritePossible().

The method AbstractServletOutputStream.onWritePossible() fires several events:

1) onError(),
 that was extracted into separate method in r1575545

2) listener.onWritePossible()
 that participated in deadlock that I reported in "7.0.52 vote" thread
and was fixed in another way in r1568804

http://svn.apache.org/r1568804
http://markmail.org/message/s4u2hpisqealxflb

My question is that these events are fired while holding a
"synchronized (writeLock) {" lock.
Is holding the writeLock lock is needed here.

The "on write possible" event is processed by webapp's code. I think
that in theory the web application can delegate processing to some
other thread. That other thread will hang trying to obtain the
writeLock to perform the actual writing.


I expect that releasing this write lock to be an other way to resolve
deadlock that I reported (that was fixed by r1568804).
The r1568804 itself is OK. I am just saying that this side of that
issue can also be improved.


Best regards,
Konstantin Kolinko

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

Reply via email to