handlerEnded static method
void
handlerEnded()
Internal: the request handler calls it when the middleware and the controller of the current request have ended. The work waits for it, so a client that leaves early does not start it while the handler still runs.
Implementation
static void handlerEnded() {
Object? pending = Zone.current[_key];
if (pending is _Pending) pending.end();
}