MCPcopy Create free account
hub / github.com/RichieSams/FiberTaskingLib / SetCurrentThreadAffinity

Function SetCurrentThreadAffinity

source/thread_abstraction.cpp:116–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116bool SetCurrentThreadAffinity(size_t coreAffinity) {
117 DWORD_PTR ret = ::SetThreadAffinityMask(::GetCurrentThread(), 1ULL << coreAffinity);
118 return ret != 0;
119}
120
121void SleepThread(int msDuration) {
122 ::Sleep(msDuration);

Callers 2

ThreadStartFuncMethod · 0.85
InitMethod · 0.85

Calls 1

GetCurrentThreadFunction · 0.85

Tested by

no test coverage detected