theraot / Theraot

Backporting .NET and more: LINQ expressions in .net 2.0 - nuget Theraot.Core available.
MIT License
159 stars 30 forks source link

Thread.GetCurrentProcessorId; Environment.CurrentManagedThreadId #179

Open OwnageIsMagic opened 2 years ago

OwnageIsMagic commented 2 years ago

Thread.GetCurrentProcessorId if native method is unavailable, it using Environment.CurrentManagedThreadId, which is also new API (returning Thread.CurrentThread.ManagedThreadId) https://github.com/dotnet/runtime/blob/1c927462696f5af7d5e667f54b1c39452cba4b2d/src/mono/System.Private.CoreLib/src/System/Threading/Thread.Mono.cs#L192 https://github.com/dotnet/runtime/blob/ef2c9044e94fa1997fff7105fb7fdc4ec7802dac/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Threading/Thread.CoreRT.Unix.cs#L166