Skip to content

Latest commit

 

History

History
64 lines (41 loc) · 1.87 KB

ccomsimplethreadallocator-class.md

File metadata and controls

64 lines (41 loc) · 1.87 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: CComSimpleThreadAllocator Class
CComSimpleThreadAllocator Class
11/04/2016
CComSimpleThreadAllocator
ATLBASE/ATL::CComSimpleThreadAllocator
ATLBASE/ATL::CComSimpleThreadAllocator::GetThread
threading [ATL], selecting threads
ATL threads
CComSimpleThreadAllocator class
ATL threads, allocating
66b2166a-8c50-49fd-b8e4-7f293470327d

CComSimpleThreadAllocator Class

This class manages thread selection for the class CComAutoThreadModule.

Syntax

class CComSimpleThreadAllocator

Members

Public Methods

Name Description
CComSimpleThreadAllocator::GetThread Selects a thread.

Remarks

CComSimpleThreadAllocator manages thread selection for CComAutoThreadModule. CComSimpleThreadAllocator::GetThread simply cycles through each thread and returns the next one in the sequence.

Requirements

Header: atlbase.h

CComSimpleThreadAllocator::GetThread

Selects a thread by specifying the next thread in the sequence.

int GetThread(CComApartment* /* pApt */, int nThreads);

Parameters

pApt
Not used in ATL's default implementation.

nThreads
The maximum number of threads in the EXE module.

Return Value

An integer between zero and (nThreads - 1). Identifies one of the threads in the EXE module.

Remarks

You can override GetThread to provide a different method of selection or to make use of the pApt parameter.

GetThread is called by CComAutoThreadModule::CreateInstance.

See also

CComApartment Class
Class Overview