Lock the mutex. The method will block the calling thread until a lock on the mutex can be obtained. The mutex remains locked until @c unlock() is called. @see lock_guard
| 280 | /// be obtained. The mutex remains locked until @c unlock() is called. |
| 281 | /// @see lock_guard |
| 282 | inline void lock() |
| 283 | { |
| 284 | #if defined(_TTHREAD_WIN32_) |
| 285 | EnterCriticalSection(&mHandle); |
| 286 | #else |
| 287 | pthread_mutex_lock(&mHandle); |
| 288 | #endif |
| 289 | } |
| 290 | |
| 291 | /// Try to lock the mutex. |
| 292 | /// The method will try to lock the mutex. If it fails, the function will |
no outgoing calls
no test coverage detected