1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-26 22:57:00 +02:00
vcmi/lib/Interprocess.h

23 lines
425 B
C
Raw Normal View History

#include <boost/interprocess/sync/interprocess_mutex.hpp>
#include <boost/interprocess/sync/interprocess_condition.hpp>
struct ServerReady
{
bool ready;
boost::interprocess::interprocess_mutex mutex;
boost::interprocess::interprocess_condition cond;
ServerReady()
{
ready = false;
}
void setToTrueAndNotify()
{
mutex.lock();
ready = true;
mutex.unlock();
cond.notify_all();
}
};