Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
queued_alarm.h
Go to the documentation of this file.
1 // Copyright 2011 Google Inc.
16 
17 #ifndef PAGESPEED_KERNEL_THREAD_QUEUED_ALARM_H_
18 #define PAGESPEED_KERNEL_THREAD_QUEUED_ALARM_H_
19 
26 
27 namespace net_instaweb {
28 
32 class QueuedAlarm : public Function {
33  public:
43  QueuedAlarm(Scheduler* scheduler,
44  Sequence* sequence,
45  int64 wakeup_time_us,
46  Function* callback);
47 
57  void CancelAlarm();
58 
59  private:
60  virtual ~QueuedAlarm();
61 
63  virtual void Run();
64 
66  void SequencePortionOfRun();
67 
71  void SequencePortionOfRunCancelled();
72 
74  Scheduler* scheduler_;
75  Sequence* sequence_;
76  Function* callback_;
77  Scheduler::Alarm* alarm_;
78 
79  bool canceled_;
80  bool queued_sequence_portion_;
81 };
82 
83 }
84 
85 #endif
Definition: sequence.h:33
Definition: queued_alarm.h:32
Definition: scoped_ptr.h:30
Definition: function.h:47
QueuedAlarm(Scheduler *scheduler, Sequence *sequence, int64 wakeup_time_us, Function *callback)
Definition: scheduler.h:47