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

Function Thread

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

Source from the content-addressed store, hash-verified

27const int32_t ITER = 400000;
28
29void Thread(void* arg)
30{
31 for (int i = 0; i < ITER; ++i)
32 {
33 dmSpinlock::Lock(&g_Lock);
34 ++g_Value;
35 dmSpinlock::Unlock(&g_Lock);
36 }
37}
38
39TEST(dmSpinlock, Test)
40{

Callers 2

__init__Method · 0.85
upload_multipartMethod · 0.85

Calls 2

LockFunction · 0.50
UnlockFunction · 0.50

Tested by

no test coverage detected