Vixen
02b45cc4
csharp
public sealed class HeadlessProcessorTopology

How many processors the runtime says this process may use.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

AvailableProcessors is ProcessorCount, which on .NET already accounts for a container's CPU quota and a process affinity mask — so a job system sized from it does the right thing in the container a dedicated server actually ships in.

Affinity is not offered. Pinning threads is per-OS work that belongs in the per-OS assemblies, and a headless head is the one place where it matters least: a server shares its machine with other tenants, and a process that pins itself to core 3 there is a process fighting the scheduler that knows more than it does.

Fields and properties (4)

  • public int AvailableProcessors

    How many logical processors this process may actually run on.

  • public int PhysicalCores

    How many physical cores there are, or AvailableProcessors where the platform does not distinguish.

  • public int PerformanceCores

    How many performance cores there are, or 0 where the platform does not say.

  • public bool SupportsAffinity

    Whether TrySetAffinity can do anything on this platform.

Methods (3)

  • public ProcessorClass ClassOf(int processor)

    What kind of core a logical processor sits on.

  • public bool TrySetAffinity(int processor)

    Pins the calling thread to one logical processor.

  • public void ClearAffinity()

    Undoes a previous TrySetAffinity for the calling thread.

Used by (1)

  • HeadlessPlatformVixen.Platform.Headless