2014-03-19 16:42 GMT+01:00 Mark Thomas <ma...@apache.org>: > On 19/03/2014 15:36, Yann Simon wrote: >> Hi, >> >> I have maybe found another problem: >> onAllDataRead is called with the same thread that is calling input.read. >> >> I updated the sample to show the problem: >> https://github.com/yanns/servlet31_async/commit/3c7618a51a8efd76956a6a29e27f350f7dbe835b >> >> The servlet displays a wrong size of the uploaded file. >> >> event.getSuppliedResponse().getOutputStream().print("Complete. Read " >> + readListener.getRead()); >> sees a wrong value from readListener.getRead() >> >> If onAllDataRead was called with another thread, it would wait for the >> synchronized (input) { } and display the right value. >> Jetty for example displays the right size. >> With Jetty: >> [Thread 13] ReadListenerImpl: onDataAvailable >> [Thread 13] onDataAvailable end >> [Thread 22] read till now: 234 >> [Thread 14] onAllDataRead >> (onAllDataRead is called after "read till now" with a different thread) >> >> With Tomcat: >> [Thread 26] ReadListenerImpl: onDataAvailable >> [Thread 26] onDataAvailable end >> [Thread 27] onAllDataRead >> [Thread 27] read till now: 234 >> (onAllDataRead is called defore "read till now" with the same thread) >> >> Can you check that? > > Tomcat version?
tomcat 8.0.3 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org