MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / poThreadCreate

Function poThreadCreate

engine/Poseidon/Foundation/Threads/PoThread.cpp:8–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#ifdef _WIN32
7
8bool poThreadCreate(ThreadId* id, long stackSize, THREAD_PROC_RETURN(THREAD_PROC_MODE* threadProc)(void*), void* arg)
9{
10 if (!threadProc)
11 {
12 return false;
13 }
14 if (stackSize < 0L)
15 {
16 stackSize = 0L;
17 }
18 DWORD thid; // thread id (unused)
19 HANDLE tid = CreateThread(nullptr, stackSize, threadProc, arg, 0, &thid);
20 if (id)
21 {
22 *id = tid;
23 }
24 return true;
25}
26
27bool poThreadJoin(ThreadId id, THREAD_PROC_RETURN* result)
28{

Callers 3

NetPeerUDPMethod · 0.85
StartMethod · 0.85
test_pothread.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected