Threading Models and Critical Sections Classes
The following classes define a threading model and critical section:
CAtlAutoThreadModule Implements a thread-pooled, apartment-model COM server.
CAtlAutoThreadModuleT Provides methods for implementing a thread-pooled, apartment-model COM server.
CComMultiThreadModel Provides thread-safe methods for incrementing and decrementing a variable. Provides a critical section.
CComMultiThreadModelNoCS Provides thread-safe methods for incrementing and decrementing a variable. Does not provide a critical section.
CComSingleThreadModel Provides methods for incrementing and decrementing a variable. Does not provide a critical section.
CComObjectThreadModel Determines the appropriate threading-model class for a single object class.
CComGlobalsThreadModel Determines the appropriate threading-model class for an object that is globally available.
CComAutoCriticalSection Contains methods for obtaining and releasing a critical section. The critical section is automatically initialized.
CComCriticalSection Contains methods for obtaining and releasing a critical section. The critical section must be explicitly initialized.
CComFakeCriticalSection Mirrors the methods in
CComCriticalSection
without providing a critical section. The methods inCComFakeCriticalSection
do nothing.CRTThreadTraits Provides the creation function for a CRT thread. Use this class if the thread will use CRT functions.
Win32ThreadTraits Provides the creation function for a Windows thread. Use this class if the thread will not use CRT functions.
See also
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho