#include "queued_worker_pool.h"
Classes | |
class | AddFunction |
Public Member Functions | |
void | Add (Function *function) |
void | set_queue_size_stat (Waveform *x) |
Friends | |
class | QueuedWorkerPool |
Functions added to a Sequence will be run sequentially, though not necessarily always from the same worker thread. The scheduler will continue to schedule new work added to the sequence until FreeSequence is called.
void net_instaweb::QueuedWorkerPool::Sequence::Add | ( | Function * | function | ) |
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.
'function' can be called any time after Add(), and may in fact be called before Add() returns.
Ownership of 'function' is transferred to the Sequence, which deletes it after execution or upon cancellation due to shutdown.