Add some debug printing

This commit is contained in:
King_DuckZ 2020-08-15 14:58:20 +01:00
parent 34040e5af1
commit 5e7d0a33cc
4 changed files with 18 additions and 0 deletions

View file

@ -88,6 +88,9 @@ std::function<void()> Eventia::event_functor() {
return std::function<void()>([this]() {
std::unique_lock<std::mutex> lock(m_local->ev_mutex);
m_local->loop.run(0);
#if !defined(NDEBUG)
std::cout << "ev loop stopped\n";
#endif
m_local->loop_end_promise.set_value();
});
}

View file

@ -20,6 +20,9 @@
#include <ev++.h>
#include <mutex>
#include <cassert>
#if !defined(NDEBUG)
# include <iostream>
#endif
namespace eve {
namespace {
@ -63,6 +66,9 @@ void Signal::on_signal_ev() {
}
void Signal::on_loop_stopping() noexcept {
#if !defined(NDEBUG)
std::cout << "Signal::on_loop_stopping()\n";
#endif
m_local->signal.stop();
}

View file

@ -21,6 +21,9 @@
#include <mutex>
#include <cassert>
#include <algorithm>
#if !defined(NDEBUG)
# include <iostream>
#endif
namespace eve {
@ -86,6 +89,9 @@ void Timer::set_timer (double delay) {
}
void Timer::on_loop_stopping() noexcept {
#if !defined(NDEBUG)
std::cout << "Timer::on_loop_stopping()\n";
#endif
m_local->timer.stop();
}

View file

@ -45,6 +45,9 @@ namespace {
{ }
virtual void on_signal() override {
#if !defined(NDEBUG)
std::cout << "SIGINT received!!\n";
#endif
m_eventia->stop();
}