Asynchronous lifetime
- Invocation-return permit release, surviving async work, actual completion and logical-work accounting.
Select a component to trace its direct connections. Drag to pan · Ctrl + wheel or pinch to zoom.
- A servlet can start asynchronous processing and return its request worker to Tomcat. The stock SemaphoreValve releases its permit when the downstream invocation returns.
- A pending asynchronous operation can therefore outlive both the worker invocation and its permit. A limit on outstanding operations needs a separate count that follows work through completion.
Reading
Asynchronous lifetime
Asynchronous lifetime
- Work can continue after a servlet or Valve returns. Admission must follow actual logical completion and cancellation when execution is asynchronous.
- Cancellation acknowledgement does not prove that I/O stopped or capacity became free.