Page Speed Optimization Libraries
1.13.35.1
|
#include "work_bound_expensive_operation_controller.h"
Public Member Functions | |
WorkBoundExpensiveOperationController (int max_expensive_operations, Statistics *stats) | |
virtual void | ScheduleExpensiveOperation (Function *callback) |
ExpensiveOperationController interface. | |
virtual void | NotifyExpensiveOperationComplete () |
Static Public Member Functions | |
static void | InitStats (Statistics *stats) |
Static Public Attributes | |
static const char | kCurrentExpensiveOperations [] |
Implements ExpensiveOperationController by using a statistic to limit multiple simultaneous expensive jobs. Named after now removed WorkBound class. This uses Statistics to communicate between multiple worker processes so does not have have the cross-process constraints of QueuedExpensiveOperationController. However, this implementation does not queue requests, instead observing the count of in-progress operations and canceling the request if that number is too great.
|
virtual |
Inform controller that the operation has been completed. Should only be called if Run() was invoked on callback above.
Implements net_instaweb::ExpensiveOperationController.