Thread.GetCurrentProcessorId 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會取得一個 ID,用來表示目前執行緒正在哪個處理器上執行。
public:
static int GetCurrentProcessorId();
public static int GetCurrentProcessorId();
static member GetCurrentProcessorId : unit -> int
Public Shared Function GetCurrentProcessorId () As Integer
傳回
一個整數代表快取的處理器 ID。
備註
這個值會被快取並定期刷新。 使用時可能已經過時:消費程式碼時不應依賴其準確性來判斷正確性。
該值不保證是以零為基礎的處理器號碼。