#include <MMutexLock.h>
Mutex lock class to be used with threads created by MThreadPool and MThreadAsync.
Public Member Functions | |
MMutexLock () | |
~MMutexLock () | |
void | lock () |
void | unlock () |
bool | tryLock () |
MMutexLock::MMutexLock | ( | ) |
Create new mutex object. The object is created unlocked.
MMutexLock::~MMutexLock | ( | ) |
Calling the destructor on a locked mutex does not unlock the mutex. That must be done by calling unlock() before calling the destructor.
void MMutexLock::lock | ( | ) |
Create a lock. If the mutex is available it is locked immediately. If it is already locked by another thread, this function waits until the other thread has unlocked it, then creates the lock.
void MMutexLock::unlock | ( | ) |
Release the current lock on a mutex.
bool MMutexLock::tryLock | ( | ) |
Attempt to lock the mutex. If the mutex is already locked by another thread, the function returns right away.
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |