Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimone Bordet2013-12-14 23:47:55 +0000
committerSimone Bordet2013-12-14 23:47:55 +0000
commit41fc2b8f8797c8d90b9d5baa0af9e75b48308d43 (patch)
treeac5c9041c06bec7ab6eb7b96c0ce5cee8a9b14bb /jetty-servlets
parent714148335639d2592b9376dec722d3c7e06887c9 (diff)
downloadorg.eclipse.jetty.project-41fc2b8f8797c8d90b9d5baa0af9e75b48308d43.tar.gz
org.eclipse.jetty.project-41fc2b8f8797c8d90b9d5baa0af9e75b48308d43.tar.xz
org.eclipse.jetty.project-41fc2b8f8797c8d90b9d5baa0af9e75b48308d43.zip
424043 - IteratingCallback Idle race.
Renamed Next enum to Action, and renamed some constant of the State enum to avoid confusion with the Action enum. Simplified succeeded() and failed(Throwable) code, covering also cases not covered before. Fixed case SCHEDULED in succeeded() that was returning in case the compareAndSet failed. Fixed race in perform(), where 2 threads may execute concurrently after having returned from process(). Vastly improved javadocs and comments.
Diffstat (limited to 'jetty-servlets')
-rw-r--r--jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/GzipHttpOutput.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/GzipHttpOutput.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/GzipHttpOutput.java
index 430c4f4791..759188e453 100644
--- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/GzipHttpOutput.java
+++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/gzip/GzipHttpOutput.java
@@ -297,7 +297,7 @@ public class GzipHttpOutput extends HttpOutput
}
@Override
- protected Next process() throws Exception
+ protected Action process() throws Exception
{
if (_deflater.needsInput())
{
@@ -307,11 +307,11 @@ public class GzipHttpOutput extends HttpOutput
_deflater=null;
getHttpChannel().getByteBufferPool().release(_buffer);
_buffer=null;
- return Next.SUCCEEDED;
+ return Action.SUCCEEDED;
}
if (!_complete)
- return Next.SUCCEEDED;
+ return Action.SUCCEEDED;
}
BufferUtil.compact(_buffer);
@@ -324,7 +324,7 @@ public class GzipHttpOutput extends HttpOutput
addTrailer();
superWrite(_buffer,complete,this);
- return Next.SCHEDULED;
+ return Action.EXECUTING;
}
}
@@ -342,7 +342,7 @@ public class GzipHttpOutput extends HttpOutput
}
@Override
- protected Next process() throws Exception
+ protected Action process() throws Exception
{
if (_deflater.needsInput())
{
@@ -354,11 +354,11 @@ public class GzipHttpOutput extends HttpOutput
_deflater=null;
getHttpChannel().getByteBufferPool().release(_buffer);
_buffer=null;
- return Next.SUCCEEDED;
+ return Action.SUCCEEDED;
}
if (!_complete)
- return Next.SUCCEEDED;
+ return Action.SUCCEEDED;
}
else
{
@@ -389,7 +389,7 @@ public class GzipHttpOutput extends HttpOutput
addTrailer();
superWrite(_buffer,complete,this);
- return Next.SCHEDULED;
+ return Action.EXECUTING;
}
}

Back to the top