Re: Tomcat 8: Firing listeners from within a synchronized(writeLock) in onWritePossible()

2014-03-10 Thread Mark Thomas
On 08/03/2014 20:50, Rémy Maucherat wrote: 2014-03-08 21:16 GMT+01:00 Konstantin Kolinko knst.koli...@gmail.com: 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

Re: Tomcat 8: Firing listeners from within a synchronized(writeLock) in onWritePossible()

2014-03-10 Thread Rémy Maucherat
2014-03-10 10:36 GMT+01:00 Mark Thomas ma...@apache.org: I'm not convinced these write locks are needed, there should be no write concurrency in the first place. The explanation for why the lock is required is in the comments in the writeInternal() method. The lock is definitely required.

Tomcat 8: Firing listeners from within a synchronized(writeLock) in onWritePossible()

2014-03-08 Thread Konstantin Kolinko
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)

Re: Tomcat 8: Firing listeners from within a synchronized(writeLock) in onWritePossible()

2014-03-08 Thread Rémy Maucherat
2014-03-08 21:16 GMT+01:00 Konstantin Kolinko knst.koli...@gmail.com: 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