Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::QueuedWorker Class Reference

See file comment. More...

#include "queued_worker.h"

Inheritance diagram for net_instaweb::QueuedWorker:
net_instaweb::Worker

Public Member Functions

 QueuedWorker (StringPiece thread_name, ThreadSystem *runtime)
 
virtual ~QueuedWorker ()
 This waits for the running task to terminate.
 
void RunInWorkThread (Function *closure)
 
- Public Member Functions inherited from net_instaweb::Worker
void Start ()
 Tries to start the work thread (if it hasn't been started already).
 
bool IsBusy ()
 
void ShutDown ()
 
void set_queue_size_stat (Waveform *x)
 

Additional Inherited Members

- Protected Member Functions inherited from net_instaweb::Worker
 Worker (StringPiece thread_name, ThreadSystem *runtime)
 
bool QueueIfPermitted (Function *closure)
 
int NumJobs ()
 

Detailed Description

See file comment.

Constructor & Destructor Documentation

net_instaweb::QueuedWorker::QueuedWorker ( StringPiece  thread_name,
ThreadSystem runtime 
)

Initializes the worker. You still need to call ->Start to actually start the thread, however. (Note: start can return false on failure).

Member Function Documentation

void net_instaweb::QueuedWorker::RunInWorkThread ( Function closure)

Runs the given closure in the work thread. Not that it's possible for the closure to be deleted without running in case where the system is shutting down.

Takes ownership of the closure.


The documentation for this class was generated from the following file: