Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

mthread.h

Go to the documentation of this file.
00001 
00004 typedef int mutex;
00005 
00006 
00007 
00009 //                                                                          //
00010 //                     ----- |                        |                     //
00011 //                       |   | _       ___   ___      |                     //
00012 //                       |   |/ | |/\ /   )  ___|  ---|                     //
00013 //                       |   |  | |   |---  (   | (   |                     //
00014 //                       |   |  | |    \__   \__|  ---|                     //
00015 //                                                                          //
00017 
00034 class Thread : public Object {
00035   public:
00036     Thread ();
00037     virtual ~Thread ();
00038 
00039     virtual void    run         () = 0;
00040     void            join        ();
00041 
00042   private:
00043     int mHandle; 
00044 };
00045 
00046 
00047 
00049 //                                                                          //
00050 //            ----- |                        | ----            |            //
00051 //              |   | _       ___   ___      | |   )           |            //
00052 //              |   |/ | |/\ /   )  ___|  ---| |---   __   __  |            //
00053 //              |   |  | |   |---  (   | (   | |     /  \ /  \ |            //
00054 //              |   |  | |    \__   \__|  ---| |     \__/ \__/ |            //
00055 //                                                                          //
00057 
00060 class ThreadPool {
00061   public:
00062                     ThreadPool  (int size);
00063     virtual         ~ThreadPool ();
00064 
00066     int             process     (Object* request);
00067 
00069     int             process     (const Object* request);
00070 
00071   private:
00072     Array<Thread> mThreads;
00073 };
00074 
00075 
00076 
00078 //                                                                           //
00079 //                         |   |                                             //
00080 //                         |\ /|        |   ___                              //
00081 //                         | V | |   | -+- /   ) \ /                         //
00082 //                         | | | |   |  |  |---   X                          //
00083 //                         |   |  \__!   \  \__  / \                         //
00084 //                                                                           //
00086 
00099 class Mutex {
00100   public:
00101 
00102     void    lock    ();
00103     void    unlock  ();
00104     bool    locked  ();
00105 
00106   private:
00107     int mHandle; 
00108 };
00109 
00110 

Generated on Thu Feb 10 20:06:42 2005 for LibMagiC by doxygen1.2.18