Page Speed Optimization Libraries
1.13.35.1
|
#include "queued_expensive_operation_controller.h"
Public Member Functions | |
QueuedExpensiveOperationController (int max_expensive_operations, ThreadSystem *thread_system, 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 | kActiveExpensiveOperations [] |
static const char | kQueuedExpensiveOperations [] |
static const char | kPermittedExpensiveOperations [] |
Implements ExpensiveOperationController using a counter and a queue to limit operations in strict order. Note that this implementation does not communicate across process boundaries; It assumes that requests from all workers will be routed to it either by virtue of running in a single process/multi-threaded environment, or through an external RPC system. See WorkBoundExpensiveOperationController for an alternate implementation that does not have this limitation.
|
virtual |
Inform controller that the operation has been completed. Should only be called if Run() was invoked on callback above.
Implements net_instaweb::ExpensiveOperationController.