Fixed build for windows

This commit is contained in:
WolverinDEV 2019-07-04 18:05:50 +02:00
parent 89fd735919
commit 96d2ca28a8

View File

@ -3,9 +3,9 @@
#include <condition_variable> #include <condition_variable>
#include <cassert> #include <cassert>
#include <algorithm> #include <algorithm>
#include "src/log/LogUtils.h" #include "./log/LogUtils.h"
#include <src/misc/sassert.h> #include "./misc/sassert.h"
#include "EventLoop.h" #include "./EventLoop.h"
using namespace std; using namespace std;
using namespace ts::event; using namespace ts::event;
@ -65,7 +65,7 @@ void EventExecutor::shutdown() {
this->_shutdown(lock); this->_shutdown(lock);
} }
bool EventExecutor::schedule(const std::shared_ptr<event::EventEntry> &entry) { bool EventExecutor::schedule(const std::shared_ptr<ts::event::EventEntry> &entry) {
unique_lock lock(this->lock); unique_lock lock(this->lock);
if(!entry || entry->_event_ptr) if(!entry || entry->_event_ptr)
return true; /* already scheduled */ return true; /* already scheduled */
@ -89,7 +89,7 @@ bool EventExecutor::schedule(const std::shared_ptr<event::EventEntry> &entry) {
return true; return true;
} }
bool EventExecutor::cancel(const std::shared_ptr<event::EventEntry> &entry) { bool EventExecutor::cancel(const std::shared_ptr<ts::event::EventEntry> &entry) {
unique_lock lock(this->lock); unique_lock lock(this->lock);
if(!entry || !entry->_event_ptr) if(!entry || !entry->_event_ptr)
return false; return false;
@ -158,7 +158,7 @@ void EventExecutor::_reassign_thread_names(std::unique_lock<std::mutex> &lock) {
} }
#endif #endif
void EventExecutor::_executor(event::EventExecutor *loop) { void EventExecutor::_executor(ts::event::EventExecutor *loop) {
while(true) { while(true) {
unique_lock lock(loop->lock); unique_lock lock(loop->lock);
loop->condition.wait(lock, [&] { loop->condition.wait(lock, [&] {