FirteX-高性能全文索引和检索平台API Documentation |
00001 // 00002 // Copyright(C) 2005--2006 Institute of Computing Tech, Chinese Academy of Sciences. 00003 // All rights reserved. 00004 // This file is part of FirteX (www.firtex.org) 00005 // 00006 // Use of the FirteX is subject to the terms of the software license set forth in 00007 // the LICENSE file included with this software, and also available at 00008 // http://www.firtex.org/license.html 00009 // 00010 // Author : 郭瑞杰(GuoRuijie) 00011 // Email : ruijieguo@software.ict.ac.cn,ruijieguo@gmail.com 00012 // Created : 2005/11/20 00013 // 00014 #ifndef _THREADPOOL_H_ 00015 #define _THREADPOOL_H_ 00016 00017 #include "Runnalble.h" 00018 #include "Thread.h" 00019 #include <vector> 00020 00021 using namespace std; 00022 00023 namespace firtex 00024 { 00025 namespace thread 00026 { 00027 class CThreadPool 00028 { 00029 public: 00030 CThreadPool(void); 00031 virtual ~CThreadPool(void); 00032 public: 00033 virtual void add(CRunnalble* aRun); 00034 virtual void wait(); 00035 00036 virtual void clear(); 00037 protected: 00038 vector<CThread*>m_threads; 00039 }; 00040 } 00041 } 00042 00043 #endif
http://www.firtex.org http://www.sourceforge.net/projects/firtex