Asynchronous lifetime

  • Invocation-return permit release, surviving async work, actual completion and logical-work accounting.
100%
TomcatRelease invocation and async resources separatelyControl / stateinvocation returnrelease stock permitasync continuationactual completionrelease at actual endretain accountingDispatch selects the requested business operation. It shares execution resources with eligible health requests, without calling the health route implicitly. Business routeStock SemaphoreValve releases its permit when the downstream invocation returns. That return does not prove asynchronously dispatched provider work completed. Invocation returnOne installed instance supplies one permit budget at its selected application scope. This illustrative nonblocking profile uses block=false; identical separate instances do not share permits.Admission ValveAsync work may survive the servlet/Valve return and caller waiting. Cancellation acknowledgement or a returned Future is not actual I/O termination. Async workRelease its resources and completion-aware logical accounting when actual work ends. Cover exceptional/cancellation callbacks and context restoration. Actual completionIf a full logical/async lifetime cap is needed, implement it separately from the stock invocation permit. Keep retained work accounted until actual completion/cancellation.Logical accountinginvocation returnrelease stock permitasync continuationactual completionrelease at actual endretain 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.
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.