--- Spectre2/Daemon.cpp 2004/12/30 06:57:50 403 +++ Spectre2/Daemon.cpp 2004/12/31 06:32:13 407 @@ -6,20 +6,20 @@ #include "Daemon.hpp" -Daemon::Daemon() : running(true), loaded(false), thread(new api::Thread(etl::BindAll(&Daemon::loop, this))) {} - -void Daemon::load() +void Daemon::wait() { - api::Cerr << this << ios::NewLine; + if (!thread.IsEmpty()) + { + thread->Join(); - loaded = true; + thread.Clear(); + } } -void Daemon::run() +void Daemon::start() { - api::Cerr << this << ios::NewLine; - - running = false; + running = true; + thread = new api::Thread(etl::BindAll(&Daemon::loop, this)); } int Daemon::loop()