Page Speed Optimization Libraries  1.4.26.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
net_instaweb::SchedulerBlockingFunction Class Reference

#include "scheduler.h"

Inheritance diagram for net_instaweb::SchedulerBlockingFunction:
net_instaweb::Function

List of all members.

Public Member Functions

 SchedulerBlockingFunction (Scheduler *scheduler)
virtual void Run ()
virtual void Cancel ()
bool Block ()
 Block until called back, returning true for Run and false for Cancel.

Detailed Description

A simple adapter class that permits blocking until an alarm has been run or cancelled. Designed for stack allocation.

Note that success_ is guarded by the acquire/release semantics of atomic_bool and by monotonicity of done_. Field order (==initialization order) is important here.


Member Function Documentation

Informs a the Function that it is being shut down. If this is called, Run() should not be called. This should never be called while a function is running. See also set_quit_requested(), which can be called during Run(), so that Run() implementations can check quit_requested() at their convenience to stop the operation in progress.

Reimplemented from net_instaweb::Function.

Callers must override this to define the action to take when a closure is run. If this is called, Cancel() should not be called. This is a convention that's expected of callers of Function objects, but is not enforced by the Function implementation.

Implements net_instaweb::Function.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines