執行緒物件和功能Threading objects and features
除了 System.Threading.Thread 類別以外,.NET 還會提供一些類別來協助您開發多執行緒應用程式。Along with the System.Threading.Thread class, .NET provides a number of classes that help you develop multithreaded applications. 下列文章概述這些類別:The following articles provide overview of those classes:
標題Title | 描述Description |
---|---|
Managed 執行緒集區The managed thread pool | 描述 System.Threading.ThreadPool 類別,這個類別提供 .NET 受控背景工作執行緒集區。Describes the System.Threading.ThreadPool class, which provides a pool of worker threads that are managed by .NET. |
計時器Timers | 說明可用於多執行緒環境的 .NET 計時器。Describes .NET timers that can be used in a multithreaded environment. |
同步處理原始物件概觀Overview of synchronization primitives | 描述可用來同步對共用資源的存取或控制執行緒互動的類型。Describes types that can be used to synchronize access to a shared resource or control thread interaction. |
EventWaitHandleEventWaitHandle | 說明 System.Threading.EventWaitHandle 類別,該類別代表執行緒同步事件。Describes the System.Threading.EventWaitHandle class, which represents a thread synchronization event. |
CountdownEventCountdownEvent | 說明 System.Threading.CountdownEvent 類別,該類別代表執行緒同步事件,會在計數為零時變成已設定。Describes the System.Threading.CountdownEvent class, which represents a thread synchronization event that becomes set when its count is zero. |
MutexMutexes | 說明 System.Threading.Mutex 類別,該類別能授與對共用資源的獨佔存取權。Describes the System.Threading.Mutex class, which grants exclusive access to a shared resource. |
Semaphore 和 SemaphoreSlimSemaphore and SemaphoreSlim | 描述 System.Threading.Semaphore 類別,它能限制可以同時存取共用資源或資源集區的執行緒數目。Describes the System.Threading.Semaphore class, which limits number of threads that can access a shared resource or a pool of resources concurrently. |
屏障Barrier | 說明 System.Threading.Barrier 類別,該類別會實作屏障模式以便協調階段式作業中的執行緒。Describes the System.Threading.Barrier class, which implements the barrier pattern for coordination of threads in phased operations. |
SpinLockSpinLock | 描述 System.Threading.SpinLock 結構,這是適用於特定低階鎖定案例之 System.Threading.Monitor 類別的輕量型替代方案。Describes the System.Threading.SpinLock structure, which is a lightweight alternative to the System.Threading.Monitor class for certain low-level locking scenarios. |
SpinWaitSpinWait | 描述 System.Threading.SpinWait 結構,它能提供微調式等候的支援。Describes the System.Threading.SpinWait structure, which provides support for spin-based waiting. |