ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Spectre2/Daemon.cpp
Revision: 403
Committed: 2004-12-29T22:57:50-08:00 (20 years, 5 months ago) by douglas
File size: 422 byte(s)
Log Message:
Grr!

File Contents

# User Rev Content
1 douglas 402 // Spectre 2
2     //
3     // Douglas Thrift
4     //
5     // $Id$
6    
7     #include "Daemon.hpp"
8    
9     Daemon::Daemon() : running(true), loaded(false), thread(new api::Thread(etl::BindAll(&Daemon::loop, this))) {}
10    
11 douglas 403 void Daemon::load()
12     {
13     api::Cerr << this << ios::NewLine;
14    
15     loaded = true;
16     }
17    
18     void Daemon::run()
19     {
20     api::Cerr << this << ios::NewLine;
21    
22     running = false;
23     }
24    
25 douglas 402 int Daemon::loop()
26     {
27     while (running) if (loaded) run(); else load();
28    
29     return 0;
30     }

Properties

Name Value
svn:eol-style native
svn:keywords Id