/
sdi-tool
/
SDI
Обзор
Документация
Войти
/
sdi-tool
/
SDI
Код
Пакеты
0
Релизы
0
Аналитика
dev
src/utils/ThreadUtil.h
24 строки
487 B
WindR
Refactor logging, add file downloader
07 ноя 2024, 18:11
07 ноя 2024, 18:11
c762bea
Код
Авторство
О чём код?
struct Mutex { CRITICAL_SECTION cs; Mutex() { InitializeCriticalSection(&cs); } ~Mutex() { DeleteCriticalSection(&cs); } void Lock() { EnterCriticalSection(&cs); } void Unlock() { LeaveCriticalSection(&cs); } }; void SetThreadName(const char* threadName, DWORD threadId = 0); void RunAsync(const Func0&, const char* threadName = nullptr); extern AtomicInt gDangerousThreadCount; bool AreDangerousThreadsPending();