// Spectre 2 // // Douglas Thrift // // $Id$ #include "Daemon.hpp" void Daemon::wait() { if (!thread.IsEmpty()) { thread->Join(); thread.Clear(); } } void Daemon::start() { running = true; thread = new api::Thread(etl::BindAll(&Daemon::loop, this)); } int Daemon::loop() { while (running) if (loaded) run(); else load(); return 0; }