Page Speed Optimization Libraries  1.3.25.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions
net_instaweb::QueuedWorkerPool::Sequence::AddFunction Class Reference

#include "queued_worker_pool.h"

Inheritance diagram for net_instaweb::QueuedWorkerPool::Sequence::AddFunction:
net_instaweb::Function

List of all members.

Public Member Functions

 AddFunction (Sequence *sequence, Function *callback)

Protected Member Functions

virtual void Run ()
virtual void Cancel ()

Detailed Description

AddFunction is a callback that when invoked queues another callback on the given sequence, and when canceled queues a cancel call to the sequence instead. The cancellation behavior is what makes this different from a simple call to MakeFunction(sequence, &Sequence::Add, callback).


Member Function Documentation

virtual void net_instaweb::QueuedWorkerPool::Sequence::AddFunction::Cancel ( ) [inline, protected, virtual]

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.

virtual void net_instaweb::QueuedWorkerPool::Sequence::AddFunction::Run ( ) [inline, protected, virtual]

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