Make threading and networking optional

This commit is contained in:
2025-02-27 04:17:12 -06:00
parent 29c53b171d
commit 02767f8710
39 changed files with 2054 additions and 99 deletions

View File

@ -8,26 +8,13 @@
#include <pthread.h>
#endif
#include <atomic>
#include "../HiddenField.hpp"
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
pthread_t thrd;
static void* cb(void* ptr);
#endif
std::function<void()> fn;
std::atomic<bool> hasInvoked;
HiddenField data;
public:
Thread(std::function<void()> fn);
void Join();