MCPcopy Create free account
hub / github.com/defold/defold / ThreadFunctionBasic

Function ThreadFunctionBasic

engine/dlib/src/test/test_mutex.cpp:29–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27};
28
29static void ThreadFunctionBasic(void* arg)
30{
31 ThreadArg* a = (ThreadArg*) arg;
32
33 for (int i = 0; i < 10000; ++i)
34 {
35 dmMutex::Lock(a->m_Mutex);
36 a->m_Value++;
37 dmMutex::Unlock(a->m_Mutex);
38 }
39}
40
41TEST(Mutex, Basic)
42{

Callers

nothing calls this directly

Calls 2

LockFunction · 0.50
UnlockFunction · 0.50

Tested by

no test coverage detected