Author: markt
Date: Wed Mar 13 18:15:13 2013
New Revision: 1456071
URL: http://svn.apache.org/r1456071
Log:
Better comments after previous changes.
Modified:
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java
Modified:
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java?rev=1456071&r1=1456070&r2=1456071&view=diff
==============================================================================
---
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java
(original)
+++
tomcat/trunk/java/org/apache/coyote/http11/upgrade/AbstractServletOutputStream.java
Wed Mar 13 18:15:13 2013
@@ -98,6 +98,9 @@ public abstract class AbstractServletOut
}
+ /**
+ * Must hold writeLock to call this method.
+ */
private void writeInternal(byte[] b, int off, int len) throws IOException {
if (listener == null) {
// Simple case - blocking IO
@@ -106,9 +109,9 @@ public abstract class AbstractServletOut
// Non-blocking IO
// If the non-blocking read does not complete, doWrite() will add
// the socket back into the poller. The poller way trigger a new
- // write event before this method has finished updating buffer.
This
- // sync makes sure that buffer is updated before the next write
- // executes.
+ // write event before this method has finished updating buffer. The
+ // writeLock sync makes sure that buffer is updated before the next
+ // write executes.
int written = doWrite(false, b, off, len);
if (written < len) {
// TODO: - Reuse the buffer
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]