You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
346 B
C++
19 lines
346 B
C++
#include "CRunServer.h"
|
|
#include <mutex>
|
|
|
|
extern std::mutex mutex_;
|
|
extern std::condition_variable condVar;
|
|
extern bool dataReady;
|
|
|
|
CRunServer::CRunServer()
|
|
{
|
|
}
|
|
|
|
void CRunServer::Auto()
|
|
{
|
|
std::cout << "Server Started..." << std::endl;
|
|
|
|
std::unique_lock<std::mutex> lck(mutex_);
|
|
condVar.wait(lck, [] { return dataReady; }); // (4)
|
|
}
|