Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/mono/System.Private.CoreLib/System.Private.CoreLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
<Platforms>x64;x86;arm;armv6;arm64;riscv64;s390x;wasm;ppc64le</Platforms>

<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>

<!-- CA2252: Opt in to preview features before using them (Lock) -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it rather be in the shared src\libraries\System.Private.CoreLib\src\System.Private.CoreLib.Shared.projitems?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would work better, updated

<EnablePreviewFeatures>true</EnablePreviewFeatures>
</PropertyGroup>

<!-- Note that various places in SPCL depend on this resource name i.e. TplEventSource -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ private static void ReliableEnterTimeout(object obj, int timeout, ref bool lockT
try_enter_with_atomic_var(obj, timeout, true, ref lockTaken);
}

#pragma warning disable CA2252 // Opt in to preview features before using them (Lock)
public static long LockContentionCount => Monitor_get_lock_contention_count() + Lock.ContentionCount;
#pragma warning restore CA2252

[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern long Monitor_get_lock_contention_count();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace System.Threading
//
internal partial class TimerQueue
{
public static long TickCount64 => Environment.TickCount64;
private static long TickCount64 => Environment.TickCount64;
private static List<TimerQueue>? s_scheduledTimers;
private static List<TimerQueue>? s_scheduledTimersToFire;
private static long s_shortestDueTimeMs = long.MaxValue;
Expand Down