ThreadList.h

00001 // $Id: ThreadList.h 21 2010-09-05 04:18:17Z cschwarz1 $
00002 
00003 #ifndef BASE_THREADLIST_H
00004 #define BASE_THREADLIST_H
00005 
00006 #include <set>
00007 #include "Condition.h"
00008 
00009 namespace base {
00010     class Thread;
00011 
00013 
00017     class PPBASE_EXPORT ThreadList: public std::set<Thread*>, public Condition {
00018     public:
00020         ThreadList();
00021 
00023 
00029         size_t cancel(int timeout = 0, size_t max = 0);
00030 
00032 
00035         bool empty();
00036 
00038 
00042         bool erase(Thread *thread);
00043 
00045 
00049         size_t insert(Thread *thread);
00050 
00052 
00055         size_t reconfig();
00056     
00058 
00061         size_t size();
00062 
00064 
00068         size_t wait(int timeout = 0);
00069 
00071         DISALLOW_COPY_CONSTRUCTOR_AND_ASSIGNMENT(ThreadList);
00072     };
00073 }
00074 
00075 #endif