CLI debugging, got rid of nasty old Thread class and replaced with newer cleaner portable idiom.
This commit is contained in:
parent
3368330b77
commit
a7c4cbe53a
17 changed files with 141 additions and 303 deletions
|
@ -55,7 +55,7 @@ class RuntimeEnvironment;
|
|||
/**
|
||||
* Database of network topology
|
||||
*/
|
||||
class Topology : protected Thread
|
||||
class Topology
|
||||
{
|
||||
public:
|
||||
/**
|
||||
|
@ -74,7 +74,7 @@ public:
|
|||
Topology(const RuntimeEnvironment *renv,const char *dbpath)
|
||||
throw(std::runtime_error);
|
||||
|
||||
virtual ~Topology();
|
||||
~Topology();
|
||||
|
||||
/**
|
||||
* Set up supernodes for this network
|
||||
|
@ -276,8 +276,10 @@ public:
|
|||
std::vector< SharedPtr<Peer> > &_v;
|
||||
};
|
||||
|
||||
protected:
|
||||
virtual void main()
|
||||
/**
|
||||
* Thread main method; do not call elsewhere
|
||||
*/
|
||||
void threadMain()
|
||||
throw();
|
||||
|
||||
private:
|
||||
|
@ -297,6 +299,7 @@ private:
|
|||
};
|
||||
|
||||
const RuntimeEnvironment *const _r;
|
||||
Thread<Topology> _thread;
|
||||
|
||||
std::map< Address,SharedPtr<Peer> > _activePeers;
|
||||
Mutex _activePeers_m;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue