Initial re-upload of spice2x-24-08-24
This commit is contained in:
31
external/stepmaniax-sdk/sdk/Windows/SMXHelperThread.h
vendored
Normal file
31
external/stepmaniax-sdk/sdk/Windows/SMXHelperThread.h
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef SMXHelperThread_h
|
||||
#define SMXHelperThread_h
|
||||
|
||||
#include "Helpers.h"
|
||||
#include "SMXThread.h"
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
using namespace std;
|
||||
|
||||
namespace SMX
|
||||
{
|
||||
class SMXHelperThread: public SMXThread
|
||||
{
|
||||
public:
|
||||
SMXHelperThread(const string &sThreadName);
|
||||
|
||||
// Call func asynchronously from the helper thread.
|
||||
void RunInThread(function<void()> func);
|
||||
|
||||
private:
|
||||
void ThreadMain();
|
||||
|
||||
// Helper threads use their independent lock.
|
||||
SMX::Mutex m_Lock;
|
||||
vector<function<void()>> m_FunctionsToCall;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user