@@ -160,11 +160,10 @@ private static Action<ResolveRequestContext> BuildMetricsMiddlewareChain(Action<
160160 var stagePhase = stage . Phase ;
161161 var stageName = stage . ToString ( ) ! ;
162162
163- // Metrics are captured around each stage execution while preserving
164- // diagnostics callbacks (if enabled for the current request). This lambda
165- // must only close over build-time state (next, stage, stagePhase, stageName)
166- // so it is allocated once per pipeline build rather than once per resolve.
167- // See issue #1493.
163+ // Metrics are captured around each stage execution while preserving diagnostics
164+ // callbacks (if enabled for the current request). Issue 1493: this lambda must
165+ // only close over build-time state so it is allocated once per pipeline build
166+ // rather than once per resolve.
168167 return context =>
169168 {
170169 if ( ! context . DiagnosticSource . IsEnabled ( ) )
@@ -218,9 +217,9 @@ private static Action<ResolveRequestContext> BuildStandardMiddlewareChain(Action
218217 {
219218 var stagePhase = stage . Phase ;
220219
221- // Hot path when execution metrics are disabled. This lambda must only close
222- // over build-time state (next, stage, stagePhase) so it is allocated once per
223- // pipeline build rather than once per resolve. See issue #1493 .
220+ // Hot path when execution metrics are disabled. Issue 1493: this lambda must only
221+ // close over build-time state so it is allocated once per pipeline build rather
222+ // than once per resolve.
224223 return context =>
225224 {
226225 // Same basic flow in if/else, but doing a one-time check for diagnostics
0 commit comments