From 4cff31f34150b78df91a0630eaec3e7d0bcc7f6b Mon Sep 17 00:00:00 2001 From: ladeak Date: Sat, 17 Aug 2024 15:35:47 +0200 Subject: [PATCH] Reverting 2 locks based on review feedback and early measurements --- .../Core/src/Internal/Http2/FlowControl/InputFlowControl.cs | 2 +- src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs index e3d57bad05071..beb43a2ea43c6 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/FlowControl/InputFlowControl.cs @@ -25,7 +25,7 @@ internal sealed class InputFlowControl private FlowControl _flow; private int _pendingUpdateSize; private bool _windowUpdatesDisabled; - private readonly Lock _flowLock = new(); + private readonly object _flowLock = new(); public InputFlowControl(uint initialWindowSize, uint minWindowSizeIncrement) { diff --git a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs index 6b601fdcc7be4..d9fbe79bf4fb8 100644 --- a/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs +++ b/src/Servers/Kestrel/Core/src/Internal/Http2/Http2FrameWriter.cs @@ -99,7 +99,7 @@ internal sealed class Http2FrameWriter private bool _completed; private bool _aborted; - private readonly Lock _windowUpdateLock = new(); + private readonly object _windowUpdateLock = new(); private long _connectionWindow; private readonly Queue _waitingForMoreConnectionWindow = new(); // This is the stream that consumed the last set of connection window