Page Speed Optimization Libraries
1.13.35.1
|
#include "sequence.h"
Public Member Functions | |
virtual void | Add (Function *function)=0 |
Interface for a holding and adding to a sequence of tasks. The mechanism for executing the tasks must be defined by implementations of this interface.
|
pure virtual |
Adds 'function' to a sequence. Note that this can occur at any time the sequence is live – you can add functions to a sequence that has already started processing. The caller is expected to ensure Function will be cleaned up after Run or Cancel.
'function' can be called any time after Add(), and may in fact be called before Add() returns. It's OK for the function to call Add again.
If the sequence is destructed after Add, but before the function has been run, function->Cancel() will be called when the Sequence is destroyed.
Implemented in net_instaweb::QueuedWorkerPool::Sequence, and net_instaweb::Scheduler::Sequence.