Page Speed Optimization Libraries  1.2.24.1
net/instaweb/util/public/scheduler_thread.h
Go to the documentation of this file.
00001 // Copyright 2011 Google Inc.
00019 
00020 #ifndef NET_INSTAWEB_UTIL_PUBLIC_SCHEDULER_THREAD_H_
00021 #define NET_INSTAWEB_UTIL_PUBLIC_SCHEDULER_THREAD_H_
00022 
00023 #include "net/instaweb/util/public/basictypes.h"
00024 #include "net/instaweb/util/public/thread.h"
00025 #include "net/instaweb/util/public/thread_system.h"
00026 
00027 namespace net_instaweb {
00028 
00029 class Function;
00030 class Scheduler;
00031 
00035 class SchedulerThread : public ThreadSystem::Thread {
00036  public:
00038   SchedulerThread(ThreadSystem* thread_system, Scheduler* scheduler);
00039 
00044   Function* MakeDeleter();
00045 
00046  protected:
00047   virtual void Run();
00048 
00049  private:
00050   class CleanupFunction;
00051   friend class CleanupFunction;
00052 
00053   virtual ~SchedulerThread();
00054 
00055   bool quit_;
00056   Scheduler* scheduler_;
00057 
00058   DISALLOW_COPY_AND_ASSIGN(SchedulerThread);
00059 };
00060 
00061 }  
00062 
00063 #endif  ///< NET_INSTAWEB_UTIL_PUBLIC_SCHEDULER_THREAD_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines