Skip to content

Commit

Permalink
Revert workarounds for dotnet/linker#2181
Browse files Browse the repository at this point in the history
Trying to revert both.
The Http3RequestStream is definitely fixed by the linker changes.
The ArrayPool ones probably not, but trying to get a repro.
  • Loading branch information
vitek-karas committed Aug 20, 2021
1 parent 56d881f commit 59da2cc
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ public bool Trim()
// Under high pressure, release all thread locals.
if (pressure == Utilities.MemoryPressure.High)
{
#if !MONO // TODO https://github.com/mono/linker/issues/2181: Remove !MONO ifdefs in this method once is fixed
if (log.IsEnabled())
{
foreach (KeyValuePair<ThreadLocalArray[], object?> tlsBuckets in _allTlsBuckets)
Expand All @@ -227,7 +226,6 @@ public bool Trim()
}
}
else
#endif
{
foreach (KeyValuePair<ThreadLocalArray[], object?> tlsBuckets in _allTlsBuckets)
{
Expand Down Expand Up @@ -270,12 +268,10 @@ public bool Trim()
// Clear out the array, and log its being trimmed if desired.
if (Interlocked.Exchange(ref buckets[i].Array, null) is T[] buffer)
{
#if !MONO
if (log.IsEnabled())
{
log.BufferTrimmed(buffer.GetHashCode(), buffer.Length, Id);
}
#endif
}
}
}
Expand Down

0 comments on commit 59da2cc

Please sign in to comment.