#pragma once
|
|
|
typedef struct _TP_CALLBACK_ENVIRON_DIT
|
{
|
TP_VERSION Version;
|
PTP_POOL Pool;
|
PTP_CLEANUP_GROUP CleanupGroup;
|
PTP_CLEANUP_GROUP_CANCEL_CALLBACK CleanupGroupCancelCallback;
|
PVOID RaceDll;
|
struct _ACTIVATION_CONTEXT *ActivationContext;
|
PTP_SIMPLE_CALLBACK FinalizationCallback;
|
union {
|
DWORD Flags;
|
struct {
|
DWORD LongFunction : 1;
|
DWORD Persistent : 1;
|
DWORD Private : 30;
|
} s;
|
} u;
|
TP_CALLBACK_PRIORITY CallbackPriority;
|
DWORD Size;
|
} TP_CALLBACK_ENVIRON_DIT;
|
|
|
class AFX_EXT_CLASS CThreadPools
|
{
|
public:
|
CThreadPools(int nThreadCount=1);
|
virtual ~CThreadPools(void);
|
int GetThreadCount() const;
|
|
private:
|
void CreateThreadPools(int nThreadCount=1);
|
void CloseThreadPools();
|
|
protected:
|
int m_nThreadCount;
|
int m_nRollback;
|
PTP_POOL m_pPool;
|
TP_CALLBACK_ENVIRON_DIT m_CallBackEnviron;
|
PTP_CLEANUP_GROUP m_pCleanupGroup;
|
};
|