mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-10-18 10:21:03 +00:00
22 lines
382 B
C
22 lines
382 B
C
|
#ifndef THREADER_H
|
||
|
#define THREADER_H
|
||
|
|
||
|
#include <mainResources.h>
|
||
|
|
||
|
struct ThreadStruct{
|
||
|
pthread_t *handler;
|
||
|
bool busy;
|
||
|
};
|
||
|
|
||
|
class Threader {
|
||
|
private:
|
||
|
static std::vector<ThreadStruct> threadPool;
|
||
|
|
||
|
public:
|
||
|
static void createThreadPool(int poolSize, void *func, ST *st);
|
||
|
static void fireThread(ST *st);
|
||
|
static pthread_t getFreeThread();
|
||
|
};
|
||
|
|
||
|
#endif // THREADER_H
|