MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / lock

Method lock

src/tinythread/tinythread.h:282–289  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 4

joinableMethod · 0.80
detachMethod · 0.80
lock_guardMethod · 0.80
waitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected