Wait() waits up to [milliseconds] milliseconds to obtain the mutex.
Check the result code here! It can very easily time out.
The default, however, is an infinite wait.
You must call Release() when done.
Remember that CATMutex only blocks per-thread. A single thread will not deadlock if it waits on the mutex twice in a row. However, it should also release it twice in a row if it does so.
- Parameters:
-
| milliseconds | - milliseconds to wait while trying to get synch |
- See also:
- Release()
Definition at line 37 of file CATMutex_Win32.cpp.
References CAT_ERR_MUTEX_INVALID_HANDLE, CAT_ERR_MUTEX_TIMEOUT, CAT_ERR_MUTEX_WAIT_ERROR, CAT_SUCCESS, CATRESULT, and fMutexHandle.
Referenced by CATPrefs::Clear(), CATPrefs::Export(), CATFileSystem_Win32::FindEnd(), CATFileSystem_Win32::FindFirst(), CATFileSystem_Win32::FindNext(), CATApp::GetBaseDir(), CATPrefs::GetPref(), CATApp::GetString(), CATPrefs::Import(), CATFileSystem_Win32::Initialize(), CATApp::LoadSkin(), CATWindow::OSWaitOnCmdThread(), CATWindow::PostEvent(), CATWindow::PostThreadedCommand(), CATWindow::ProcessPostedEvent(), CATWindow::ThreadedCmdThread(), CATApp::~CATApp(), CATFileSystem::~CATFileSystem(), and CATWindow::~CATWindow().