nesca/Threader.h

26 lines
478 B
C
Raw Normal View History

2015-03-17 14:30:53 +00:00
#ifndef THREADER_H
#define THREADER_H
2015-03-22 00:43:15 +00:00
#include "mainResources.h"
#include "externData.h"
2015-03-18 14:28:39 +00:00
#include <thread>
2015-03-19 14:34:35 +00:00
#include <mutex>
#include <condition_variable>
2015-03-20 14:28:51 +00:00
#include <queue>
2015-03-17 14:30:53 +00:00
class Threader {
2015-03-18 14:28:39 +00:00
public:
2015-03-19 14:34:35 +00:00
static int threadId;
2015-03-20 14:28:51 +00:00
static std::mutex m;
static bool ready;
2015-03-19 14:34:35 +00:00
static std::condition_variable cv;
2015-03-20 14:28:51 +00:00
static std::queue<std::string> ipQueue;
2015-03-17 14:30:53 +00:00
public:
2015-03-20 14:28:51 +00:00
static void fireThread(std::string ip, void *func(void));
2015-03-18 14:28:39 +00:00
static void cleanUp();
2015-03-17 14:30:53 +00:00
};
#endif // THREADER_H