cthreadpool.h

来自「window下的多线程编程参考书。值得一读」· C头文件 代码 · 共 29 行

H
29
字号
//
// FILE: CThreadPool.h
//
// Copyright (c) 1997 by Aaron Michael Cohen and Mike Woodring
//
/////////////////////////////////////////////////////////////////////////

#ifndef __CThreadPool_H__
#define __CThreadPool_H__

// CThreadPool is an abstract base class that defines the
// semantics of a thread pool object.
//
class CThreadPool
{
    public:
        virtual ~CThreadPool() {}

        // The DispatchThread function grabs an idle thread from the
        // pool and causes it to resume execution by invoking the
        // supplied thread handler object's ThreadHandlerProc
        // procedure.  This is the same thread handler class that is
        // used by the CMclThread class.
        //
        virtual BOOL DispatchThread( CMclThreadHandler *pHandler ) = 0;
};

#endif // __CThreadPool_H__

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?