megamove
This commit is contained in:
parent
c2e201f813
commit
f51105bde0
114 changed files with 92 additions and 0 deletions
28
src/tsqueue.h
Normal file
28
src/tsqueue.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef TSQUEUE_H
|
||||
#define TSQUEUE_H
|
||||
|
||||
#include "Win32Event.h"
|
||||
#include <deque>
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
|
||||
class TSQueue {
|
||||
public:
|
||||
using t_Callable = std::function<void()>;
|
||||
|
||||
TSQueue();
|
||||
void add(t_Callable callable);
|
||||
bool empty();
|
||||
t_Callable pop();
|
||||
|
||||
HANDLE getNewDataEventHandle();
|
||||
private:
|
||||
using t_CallableQueue = std::deque<t_Callable>;
|
||||
|
||||
Win32Event newData;
|
||||
std::mutex m;
|
||||
t_CallableQueue futureQueue;
|
||||
};
|
||||
|
||||
|
||||
#endif // TSQUEUE_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue