17 #ifndef PAGESPEED_CONTROLLER_QUEUED_EXPENSIVE_OPERATION_CONTROLLER_H_
18 #define PAGESPEED_CONTROLLER_QUEUED_EXPENSIVE_OPERATION_CONTROLLER_H_
28 #include "pagespeed/kernel/base/thread_annotations.h"
31 namespace net_instaweb {
43 static const char kActiveExpensiveOperations[];
44 static const char kQueuedExpensiveOperations[];
45 static const char kPermittedExpensiveOperations[];
59 void IncrementInProgress() EXCLUSIVE_LOCKS_REQUIRED(mutex_);
60 void DecrementInProgress() EXCLUSIVE_LOCKS_REQUIRED(mutex_);
62 void Enqueue(
Function*
function) EXCLUSIVE_LOCKS_REQUIRED(mutex_);
63 Function* Dequeue() EXCLUSIVE_LOCKS_REQUIRED(mutex_);
65 const int max_in_progress_;
66 std::queue<Function*> queue_ GUARDED_BY(mutex_);
67 int num_in_progress_ GUARDED_BY(mutex_);
Definition: queued_expensive_operation_controller.h:40
Definition: expensive_operation_controller.h:28
Base class for implementations of monitoring statistics.
Definition: statistics.h:342
virtual void ScheduleExpensiveOperation(Function *callback)
ExpensiveOperationController interface.
virtual void NotifyExpensiveOperationComplete()
Definition: scoped_ptr.h:30
Definition: function.h:47
Definition: thread_system.h:40
Definition: statistics.h:73
Definition: statistics.h:298