#pragma once #include #if defined(_WIN32) #include #elif defined(GEKKO) #include #else #include #endif #include namespace Tesses::Framework::Threading { class Thread { #if defined(_WIN32) HANDLE thrd; DWORD thrdId; public: #elif defined(GEKKO) lwp_t thrd; static void* cb(void* ptr); #else thrd_t thrd; static int cb(void* ptr); #endif std::function fn; std::atomic hasInvoked; public: Thread(std::function fn); void Join(); void Detach(); }; }