Implements a sleeping loop to wait for the mutex to unlock.
- Purpose
- Since this class puts the thread to sleep for short intervals, you can use this class for most of your mutexes. Especially for locking any high level resources where any one operation on the resouce consumes many CPU cycles. The purpose of this mutex is to reduce the number of CPU cycles spent in idle loops. All SleepLevelMutex's should have higher levels than all your SpinLevelMutex's.
- Dependence on SpinLevelMutex
- This utilizes SpinLevelMutex so it does not have to re-implement the DoTryLock and DoUnlock functions the same way. All it really needs is a DoLock function and the amount of time it should sleep if an attempt to lock a function fails.