Public Member Functions

SimpleMutex Class Reference

An easy to use mutex. More...

#include <SimpleMutex.h>

List of all members.

Public Member Functions

 SimpleMutex ()
 ~SimpleMutex ()
void Lock (void)
void Unlock (void)

Detailed Description

An easy to use mutex.

I wrote this because the version that comes with Windows is too complicated and requires too much code to use.

Remarks:
Previously I used this everywhere, and in fact for a year or two RakNet was totally threadsafe. While doing profiling, I saw that this function was incredibly slow compared to the blazing performance of everything else, so switched to single producer / consumer everywhere. Now the user thread of RakNet is not threadsafe, but it's 100X faster than before.

Definition at line 26 of file SimpleMutex.h.


Constructor & Destructor Documentation

SimpleMutex::SimpleMutex (  ) 

Definition at line 11 of file SimpleMutex.cpp.

SimpleMutex::~SimpleMutex (  ) 

Definition at line 17 of file SimpleMutex.cpp.


Member Function Documentation

void SimpleMutex::Lock ( void   ) 

Definition at line 35 of file SimpleMutex.cpp.

void SimpleMutex::Unlock ( void   ) 

Definition at line 79 of file SimpleMutex.cpp.


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