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

#include "queued_worker_pool.h"

List of all members.

Classes

class  AddFunction

Public Member Functions

void Add (Function *function)
void set_queue_size_stat (Waveform *x)
void set_max_queue_size (size_t x)
void CancelPendingFunctions ()
 Calls Cancel on all pending functions in the queue.

Friends

class QueuedWorkerPool

Detailed Description

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.


Member Function Documentation

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.

If the pool is being shut down at the time Add is being called, this method will call function->Cancel().

Sets the maximum number of functions that can be enqueued to a sequence. By default, sequences are unbounded. When a bound is reached, the oldest functions are retired by calling Cancel() on them.


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