Page Speed Optimization Libraries
1.5.27.2
|
#include "null_thread_system.h"
Public Member Functions | |
virtual CondvarCapableMutex * | NewMutex () |
virtual RWLock * | NewRWLock () |
virtual Timer * | NewTimer () |
virtual ThreadId * | GetThreadId () const |
void | set_current_thread (int id) |
Provide injection/observation of current thread IDs. | |
int | current_thread () const |
Mock thread system. This can create mutexes that do no locking, but currently cannot create any threads or condvars -- doing so will result in a fatal error.
virtual ThreadId* net_instaweb::NullThreadSystem::GetThreadId | ( | ) | const [virtual] |
Returns an object holding the current thread ID. The resultant object must be freed by the caller.
Implements net_instaweb::ThreadSystem.
virtual CondvarCapableMutex* net_instaweb::NullThreadSystem::NewMutex | ( | ) | [virtual] |
Makes a new mutex for this system.
See also CondvarCapableMutex::NewCondvar.
Implements net_instaweb::ThreadSystem.
virtual RWLock* net_instaweb::NullThreadSystem::NewRWLock | ( | ) | [virtual] |
This lock will provide following guarantee -
Implements net_instaweb::ThreadSystem.
virtual Timer* net_instaweb::NullThreadSystem::NewTimer | ( | ) | [virtual] |
Creates and returns a real-time timer. Caller is responsible for deleting.
Implements net_instaweb::ThreadSystem.