Mesen-X/Utilities/AutoResetEvent.h
Souryo 37c3201057 Frame decoding/Rendering is now handled by separate threads (i.e there are now 3 threads in the emu + UI thread)
Improved performance (less memory copying, less spin waiting, etc.) - uses less CPU at normal speed, and faster when no FPS limit
2015-08-30 21:04:21 -04:00

20 lines
288 B
C++

#pragma once
#include "stdafx.h"
#include <condition_variable>
#include <mutex>
class AutoResetEvent
{
private:
std::condition_variable _signal;
std::mutex _mutex;
bool _signaled;
public:
AutoResetEvent();
~AutoResetEvent();
void Wait(int timeoutDelay = 0);
void Signal();
};