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

Classes

class  TimedWaitCallback
 

Public Member Functions

 NullCondvar (ThreadSystem::CondvarCapableMutex *m)
 
virtual
ThreadSystem::CondvarCapableMutex
mutex () const
 Return the mutex associated with this condition variable.
 
virtual void Signal ()
 
virtual void Broadcast ()
 
virtual void Wait ()
 
virtual void TimedWait (int64 timeout_ms)
 
GoogleString ActionsSinceLastCall ()
 
void set_timed_wait_callback (TimedWaitCallback *x)
 

Member Function Documentation

virtual void net_instaweb::NullCondvar::Broadcast ( )
inlinevirtual

Broadcast to all threads waiting on condvar. mutex() must be held as with Signal().

Implements net_instaweb::ThreadSystem::Condvar.

void net_instaweb::NullCondvar::set_timed_wait_callback ( TimedWaitCallback x)
inline

Calls callback once the next time TimedWait() is called. If TimedWait() is not called we will CHECK-fail. Doesn't take ownership of the callback.

virtual void net_instaweb::NullCondvar::Signal ( )
inlinevirtual

Signal the condvar, waking a waiting thread if any. mutex() must be held by caller. Example: { ScopedMutex lock(cv.mutex()); make_resource_available(); cv.Signal(); }

Implements net_instaweb::ThreadSystem::Condvar.

virtual void net_instaweb::NullCondvar::TimedWait ( int64  timeout_ms)
virtual

Wait for condition to be signaled, or timeout to occur. Works like Wait(), and cv.mutex() must be held on entry and re-taken on exit.

Implements net_instaweb::ThreadSystem::Condvar.

virtual void net_instaweb::NullCondvar::Wait ( )
inlinevirtual

Wait for condition to be signaled. mutex() must be held; it will be released and then reclaimed when a signal is received. Note that a Wait() may be terminated based on a condition being true, but the condition may no longer be true at the time the thread wakes up. Example: { ScopedMutex lock(cv.mutex()); while (status && !resource_available()) status = cv.wait(); if (status) { use_resource(); } }

Implements net_instaweb::ThreadSystem::Condvar.


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