MCPcopy Create free account
hub / github.com/cameron314/readerwriterqueue / SimpleThread::ThreadRef

Class SimpleThread::ThreadRef

tests/common/simplethread.cpp:7–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <windows.h>
6
7struct SimpleThread::ThreadRef
8{
9 HANDLE handle;
10
11 static DWORD WINAPI ThreadProc(LPVOID param)
12 {
13 auto threadRef = static_cast<ThreadRef*>(param);
14 threadRef->callbackFunc(threadRef->callbackObj);
15 return 0;
16 }
17
18 ThreadRef(void* callbackObj, CallbackFunc callbackFunc)
19 : callbackObj(callbackObj), callbackFunc(callbackFunc)
20 {
21 }
22
23 void* callbackObj;
24 CallbackFunc callbackFunc;
25};
26
27void SimpleThread::startThread(void* callbackObj, CallbackFunc callbackFunc)
28{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected